For each in Me.Controls
Posted on 2006-07-17
I got many buttons okay. Lets say 6 with their names: Button1, Button2, Button3 etc.
I want to manipulate for example Button4.
I would like to manipulate that way:
dim str = "Button", x as Integer = 1
("Button" + x).Name .....
I know, we cant do that. I know its possible by the way of a For each than you check the ctrl.Name , then if its then same, you can play with it. But I tought it was not 100% efficiant. Is there a way like my ("Button" + x) to call that button other than a for each, other than calling Button4.name too ... the thing is, it will be never the same button. It might change that why I was needed that integer (x) or a for each