Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Dynamically Assign Objects to Form Objects.
I have ten listboxes on a form, ddlwb1, ddlwb2 etc. I want to loop through
them and dynamically assign them to an object like so: For i = 1 To 10 Set objDdl = ddlwb & i 'do something else with objDdl Next Obviously this doesn't work, but I vaguely recall a command that will make it work, though for the life of me I can't remember what. Thanks, Wayne C. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Dynamically Assign Objects to Form Objects.
For i = 1 To 10
Set objDdl = Userform1.Controls("ddlwb" & i) 'do something else with objDdl Next -- Regards, Tom Ogilvy "The Vision Thing" wrote in message ... I have ten listboxes on a form, ddlwb1, ddlwb2 etc. I want to loop through them and dynamically assign them to an object like so: For i = 1 To 10 Set objDdl = ddlwb & i 'do something else with objDdl Next Obviously this doesn't work, but I vaguely recall a command that will make it work, though for the life of me I can't remember what. Thanks, Wayne C. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Dynamically Assign Objects to Form Objects.
Thank you Tom, worked like a charm.
Wayne C. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Unable to remove Sheet objects in the Microsoft Excel Objects | Excel Programming | |||
loop through form objects | Excel Programming | |||
Moving objects on a form | Excel Programming | |||
Assign macros to dynamically created form elements | Excel Programming | |||
Can't insert form objects | Excel Programming |