Control array
You've obviously read about control arrays somewhere. The problem is that
they do not exist in VBA. They exist in VB6 but not in VBA.
I wasn't clear on your exact reason for using the array. There is always a
work-around in VBA it just takes a little more work.
For example, if I want to work my way through a group of controls then I
name all of the related controls that I want to loop through like this
"Control1, Control2, Control3..." Then I set up a FOR-NEXT LOOP.
For each Control in (whatever object you are working with) if Control.name
like "Control*" then
In here I then use Strings.left or Strings.right to sequence my way
through
each of the ending digits. Or I use some other variation on this
theme.
End if
It works just fine.
|