For x = 1 to 3
With UserForm1.Controls("ListBox" & i)
.additem = A
.additem = B
End With
next x
--
Regards,
Tom Ogilvy
"chris" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>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!
>
|