G
Guest
Silly question of the day....
I was wondering how you programatically find the "upper bound" of an array
(i.e, count of elements in an array). I've tried to find examples but
everywhere I look the number of elements is defined in the code by the
programmer.
Here is my sample code:
Dim varData As Variant
varData = Array("apples", "oranges", "loquats")
vLimit = <<<upper bound>>>
For vCount = 0 To vLimit
'' processing
Next
I would like to plug the right code into <<<upper bound>>> to find the
number of elements I need to loop through.
The only other thing I can think of is to loop through the array until I get
an error.
Either way, any tips?
Thanks!
Janet Panighetti
I was wondering how you programatically find the "upper bound" of an array
(i.e, count of elements in an array). I've tried to find examples but
everywhere I look the number of elements is defined in the code by the
programmer.
Here is my sample code:
Dim varData As Variant
varData = Array("apples", "oranges", "loquats")
vLimit = <<<upper bound>>>
For vCount = 0 To vLimit
'' processing
Next
I would like to plug the right code into <<<upper bound>>> to find the
number of elements I need to loop through.
The only other thing I can think of is to loop through the array until I get
an error.
Either way, any tips?
Thanks!
Janet Panighetti