Forum Discussion
Alina
12 years agoOccasional Contributor
Thanks for your help Tanya, im scripting using VBScript and what I want to achieve is: I have 3 top level folders and one text file in a list and I want to create a For Next loop that iterates through each row and logs the name of the Folder/File to the test log.
Thanks,
Im getting the subscript out of range error on ItemList.
The code now reads:
Thanks,
Im getting the subscript out of range error on ItemList.
The code now reads:
Sub
TestArray()
Dim
ItemList(5)
Dim
i, j, size
ItemList(0) = "name1"
ItemList(1) = "name2"
ItemList(2) = "name3"
ItemList(3) = "name4"
size = UBound(ItemList())
'Call Aliases.Explorer.Window.SetFocus
For
i = 0 To size
Log
.Message "The Item names are" & (ItemList())
' For j = 0 To Table.
' Log.Message (ItemList)
' Next j
Next
End
Sub