![]() |
comobox-name as variable
Hy!
I have the following problem: I have a function, which should set the visibility of a variable list of comboboxes to false. Let's say I have comboboxes named "1", "2" and "3". Now I have tried the following: For counter = 1 to 3 worksheets(my_sheet).counter.visible = False Next But now the program is looking for an object with the name "counter", and not "1" to "3". Has somebody an idea how I can manage this problem? Thanks for any help! Christian Galbavy |
comobox-name as variable
Depends if its a forms checkbox or a control toolbox combobox.
Former worksheets(my_sheet).DropDowns(counter).Visible=Tr ue Latter worksheets(my_sheet).Oleobjects(counter).Visible=T rue -- HTH RP (remove nothere from the email address if mailing direct) "Christian Galbavy" wrote in message ... Hy! I have the following problem: I have a function, which should set the visibility of a variable list of comboboxes to false. Let's say I have comboboxes named "1", "2" and "3". Now I have tried the following: For counter = 1 to 3 worksheets(my_sheet).counter.visible = False Next But now the program is looking for an object with the name "counter", and not "1" to "3". Has somebody an idea how I can manage this problem? Thanks for any help! Christian Galbavy |
All times are GMT +1. The time now is 02:35 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com