Grouping controls

francoiss

Registered User.
Local time
Today, 08:53
Joined
Mar 6, 2007
Messages
14
hi! :)

is there a way to group controls so that if you wanna use these controls, you just have to loop through it?

example:

10 textboxes

to use these 10 textboxes, you will just use for i=1 to 10 etc... etc...

Thanks. :)
 
Actually, you can either just number their names, but since I like to name them what they are, I just use the Tag.

So, set the tag as something like myTextBox

and then use

Code:
Dim ctl As Control

For Each ctl in Me.Controls
  If ctl.Tag = "myTextBox" Then
      ...do whatever here
  End If
Next
 
hey bob,

thanks for your quick rely :)

actually im thinking of putting all the controls in an array hehe
but i think your suggestion is much better :)

thank you very very much!!!
 

Users who are viewing this thread

Back
Top Bottom