Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have many combobox's and would like to change there values. Rather than
listing everysingle one in vba I would like to use a interger and have it cycle through all of the combobox's and update them with a list. Any idea's how I can write the code. -- Thanks! Shane W |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Use the Controls function on the form, the following illustrates identifying
each control called ComboBox1 to ComboBox3 Dim xControl As Integer For xControl = 1 To 3 Controls("ComboBox" & xControl).Enabled = False Next -- Cheers Nigel "whylite" wrote in message ... I have many combobox's and would like to change there values. Rather than listing everysingle one in vba I would like to use a interger and have it cycle through all of the combobox's and update them with a list. Any idea's how I can write the code. -- Thanks! Shane W |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks Nigel but I get a Message stating sub or function undefined for
Controls. Do I have to define Controls and/or is this a macro for a userform. If I have to define Controls could you let me know how. The combobox's that I am using are on a sheet. Sometimes I have to import values from another workbook. The problem I am having is when the values come into the sheet and hit the combobox's the macro attached to the boxes goes off shutting excel down because of overload. That is why I need to hit the combobox's with the values instead. If I input the value into the box everything is good. I have 175 boxes to input. Hence the need for a macro that will loop through the boxes. I could write out each in vba I am just trying to save myself hours of typing. -- Thanks! Shane W "Nigel" wrote: Use the Controls function on the form, the following illustrates identifying each control called ComboBox1 to ComboBox3 Dim xControl As Integer For xControl = 1 To 3 Controls("ComboBox" & xControl).Enabled = False Next -- Cheers Nigel "whylite" wrote in message ... I have many combobox's and would like to change there values. Rather than listing everysingle one in vba I would like to use a interger and have it cycle through all of the combobox's and update them with a list. Any idea's how I can write the code. -- Thanks! Shane W |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I add an integer to an existing integer? | Excel Worksheet Functions | |||
Random Integer | New Users to Excel | |||
integer | Excel Worksheet Functions | |||
Get next Integer value | Excel Programming | |||
Not seeing integer | Excel Programming |