Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Looping through multiple controls
Hi all...
I have a multipage object, with a list box on each page. I would like to loop through all of the listbox objects in a for next loop... checking/setting properties. How can I do this? They don't have an index property... but I have named them LB1, LB2, LB3... Ideas? Thanks, Mike |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Looping through multiple controls
Even though they are on pages of a multipage, I believe you can reference
them directly from the userform Dim lbox as MSForms.Listbox for i = 1 to 4 set lbox = Userform1.Controls("LB" & i) lbox.listindex = -1 Next -- Regards, Tom Ogilvy "rci" wrote in message ... Hi all... I have a multipage object, with a list box on each page. I would like to loop through all of the listbox objects in a for next loop... checking/setting properties. How can I do this? They don't have an index property... but I have named them LB1, LB2, LB3... Ideas? Thanks, Mike |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Looping through multiple controls
For x = 1 To Worksheets.Count
Worksheets(x).ListBox(1) Next x - Piku -- Message posted from http://www.ExcelForum.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Cannot select multiple controls | New Users to Excel | |||
LOOPING multiple ranges | Excel Discussion (Misc queries) | |||
Macro bug - looping thru multiple worksheets - workaround? | Excel Programming | |||
looping to create multiple files | Excel Programming | |||
Looping thru custom controls | Excel Programming |