Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I was wondering if someone out there might know how I would be able to
do the following: I have 3 ComboBoxes and 3 Labels that are named as follows Label_1 Label_2 Label_3 ComboBox_1 ComboBox_2 ComboBox_3 I am trying to create a subroutine to go through a loop from 1-3 and hide both the comboboxes and labels, but for some reason I can not use variables to call an object. Any ideas how I could make this work? here is my subroutine so far sub removeitems () dim counter as integer dim tag1 as string dim tag2 as string dim ctl as control counter = 1 tag1 = "ComboBox_" tag2 = "Label_" do until counter = 3 ctl = tag1 & counter (I have also tried using Set ctl =) ctl.visible = false ctl = tag2 & counter ctl.visible = false counter = counter + 1 loop end sub *** Sent via Developersdex http://www.developersdex.com *** |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Not at all clear on use of variables and/or object variables | Excel Discussion (Misc queries) | |||
Calling subroutines and passing variables | Excel Programming | |||
Calling Macro - Will it take variables? | Excel Programming | |||
Calling the wrong macro | Excel Programming | |||
calling windows with variables | Excel Programming |