longm
13 years agoNew Contributor
Attempting to get a count of an array/object
Code:
Message = MSPrompt.MessageBox.MessageText.Caption
LogMessage = "Message Box: "+Message
Substring = Split(LogMessage,char(10))
For i = 0 to XXX
Substring(i) = Utilities.TrimLeft(Substring(i))
LogText = LogText&Substring(i)
Next
------------------------------------
I split the string LogMessage on line feed characters with the Split command. This creates a dynamic array of Substring. Then I would like to trim the line feed characters from each element of the array. In order to loop through all the elements of the array I need to count them first.
How do I count the elements of this type of array/object?