PDA

View Full Version : [SOLVED] toggleButtons...



ferrugo
03-16-2010, 12:51 PM
hi guys

i have many toggleButtons in a form, and every time i use this form some toggleButton must be visible and some time invisible.

how can i create a "for / next" for it ??

""


For i = 25 To 50
X = "UserForm2.ToggleButton" & i
with x
.visible = false
end with
next i


""


as we see, i need a for (for a command)...

Thanks (and sorry about the poor english).

Bob Phillips
03-16-2010, 02:29 PM
For i = 25 To 50
Set X = Me.Controls("ToggleButton" & i)
x.Visible = False
Next x