Is there a way to determine the total number of elements in an array?
Like if I did this:
that turns stuff into an array. Is there a way to return how many elements are in that array??Code:Dim stuff As Variant
stuff = Split(Text1.Text,",")
Printable View
Is there a way to determine the total number of elements in an array?
Like if I did this:
that turns stuff into an array. Is there a way to return how many elements are in that array??Code:Dim stuff As Variant
stuff = Split(Text1.Text,",")
Use the UBound() function.
Code:MsgBox "There are " & UBound(stuff) & " number of elements in this array"
If it's 2-10, though that will return 10.
Use UBound() - LBound()