Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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! |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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! |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Is it safe to assume that the "i" should be an "x"? I am also
receiving a Run-time error '438'. Any ideas for a solution? Thanks! Tom Ogilvy wrote: 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! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Assign Sub Name to a Variable | Excel Programming | |||
Assign value to variable | Excel Discussion (Misc queries) | |||
Assign a variable from a Listbox selection. | Excel Programming | |||
Assign a variable from a Listbox selection. | Excel Programming | |||
Assign a variable from a Listbox selection. | Excel Programming |