Error in rule

Error in rule

GosponZ
Collaborator Collaborator
429 Views
2 Replies
Message 1 of 3

Error in rule

GosponZ
Collaborator
Collaborator

ERROR.JPG

I do have in Exel only one column with few Client names, and i have this rule. Guys i need you help to help me understand why this warning is up and after continue  rule is working correct. What i need to fix? Thanks

myXLSX = "C:\Customer.xlsx"

GoExcel.Open(myXLSX)

ForrowNumber = 2 To 1000

If (GoExcel.CellValue("A"&rowNumber) = (""))Then

lastUsedRow = rowNumber- 1

EndIf

Next

'set the list to be read from the XLS file

DimmyArrayListAsNewArrayList

i = 2

'add the values from the Excel file to an array list

DoUntili = lastUsedRow+1

myArrayList.add(GoExcel.CellValue("A"&i))

i = i+ 1

Loop

'present the list to the user

myCust1 = InputListBox("Select Customer from list", myArrayList,myArrayList.Item(0), "iLogic", "Customer")

'set the iProperty

iProperties.Value("Summary", "Company") = myCust1

0 Likes
Accepted solutions (1)
430 Views
2 Replies
Replies (2)
Message 2 of 3

rossano_praderi
Collaborator
Collaborator
Accepted solution

Hi, I've made few modifications to your code and now run without errors.

 

'myXLSX = "C:\Customer.xlsx"
GoExcel.Open("C:\Customer.xlsx", "Sheet1")
lastUsedRow = 2
'set the list to be read from the XLS file
Dim myArrayList As New ArrayList
'add the values from the Excel file to an array list
While GoExcel.CellValue("A" & lastUsedRow) <> ""
		myarraylist.add(GoExcel.CellValue("A" & lastUsedRow))
	lastUsedRow = lastUsedRow + 1
End While

'present the list to the user
myCust1 = InputListBox("Select Customer from list", myArrayList, myArrayList, Title := "iLogic", ListName := "Customer")

'set the iProperty
iProperties.Value("Summary", "Company") = myCust1

 

Bregs

Rossano Praderi



--------------------------------------
If my post answers your question, please click the "Accept as Solution"
button. This helps everyone find answers more quickly!
---------------
Message 3 of 3

GosponZ
Collaborator
Collaborator

Hi,

thank you and  indeed working well.

0 Likes