Number of Items in an Array.
Hi
NumValues = ubound(Users)
--
Regards
Frank Kabel
Frankfurt, Germany
Craig & Co. wrote:
Hi,
How do I find out the number of items in an array, so that I can loop
check the values in the array with the incoming data.
Dim Users as Variant
Dim NumValues, Counter as Integer
Users = Array("Bob","Fred")
NumValues = Users
For Counter = 0 to NumValues
CheckUser = Users(Counter)
If CheckUser = IncomingUser then
Print "Cool" - okay this is just pseudo code.
Else
Print "Not Cool"
End If
next
Cheers
Craig.
|