Hi!
I have a function that takes an array of integers as argument. This is a dynamic array so I don“t know how may elements in this array.
How do I find that out?
Thanks in advance
Jen
Printable View
Hi!
I have a function that takes an array of integers as argument. This is a dynamic array so I don“t know how may elements in this array.
How do I find that out?
Thanks in advance
Jen
Use LBound to get the lower bound of the array (usually 0 or 1) and UBound to get the upperbound (last entry) of the array.
Crazy D @ Work :-)
You could use the LBound and the Ubound functions to return the lower/upper bounds of the array
for eg.,
dim aryNames(10)
MsgBox LBound(aryNames)
MsgBox UBound(aryNames)