Number of elements in an array
Thanks Jim,
It gets me nuts to not be able to find items like this, and I looked thru
a lot of array stuff and Ubound was not mentioned, at least in the Excel help
sections that I looked at.
--
Neal Z
"Jim Thomlinson" wrote:
You are looking for UBound(myArray) to find the upper bound of the array.
There is also LBound which finds the lower bound. usually you can just use
zero but sometimes it is handy...
--
HTH...
Jim Thomlinson
"Neal Zimm" wrote:
I have some arrays dim'd in the declarations procedure that are accessed by
different macros.
at times I'm lazy and get tired of looking back to see the (1 to ??) value.
when I loop thru string vars, I often use: for x = 1 to len(varname)
Is there a similar statement or property for fixed length arrays?
I looked thru help on array, dim, etc. and could not find it.
maybe there's a way to use .count ?
Thanks.
--
Neal Z
|