Assign variable ListBox names
For x = 1 to 3
With UserForm1.Controls("ListBox" & i)
.additem = A
.additem = B
End With
next x
--
Regards,
Tom Ogilvy
"chris" wrote in message
oups.com...
I have a user form with three list boxes. Is there a "For" statement
(similar to below) that will loop through each of the three list boxes
and execute a "with" command?
For x = 1 to 3
With UserForm1.ListBox(x)
.additem = A
.additem = B
End With
next x
Any help is greatly appreciated, thank you!
|