Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
combobox increment
Is there a way of using a for/next routine to call a multitude of comboboxes.
i.e, if I have say, 100 comboboxes, something like combo = combobox & i for i = 0 to 99 me.cells(rowno,cellno) = combo.value (this being each combo box from combobox1 onwards) next i as opposed to having to type out a routine for each combobox? Thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
combobox increment
I think you'll need to use an object variable and then Set this
variable to each Combobox in turn. So something more like: Dim Combo as Object Dim i as Integer for i = 0 to 99 set Combo = combo & i cells(rowno,cellno) = combo.value next i (not tested so my throw a bug, but I'm sure it is moving in the correct direction) Rgds J KneeDown2Up wrote: Is there a way of using a for/next routine to call a multitude of comboboxes. i.e, if I have say, 100 comboboxes, something like combo = combo & i for i = 0 to 99 me.cells(rowno,cellno) = combo.value (this being each combo box from combobox1 onwards) next i as opposed to having to type out a routine for each combobox? Thanks |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
combobox increment
Ok, thanks for that. It comes back with an error message of Object variable
not set? I then changed the line ' Set combo = combo & i' to 'Set combo = combobox & i ' and received a "Object required" error. "WhytheQ" wrote: I think you'll need to use an object variable and then Set this variable to each Combobox in turn. So something more like: Dim Combo as Object Dim i as Integer for i = 0 to 99 set Combo = combo & i cells(rowno,cellno) = combo.value next i (not tested so my throw a bug, but I'm sure it is moving in the correct direction) Rgds J KneeDown2Up wrote: Is there a way of using a for/next routine to call a multitude of comboboxes. i.e, if I have say, 100 comboboxes, something like combo = combo & i for i = 0 to 99 me.cells(rowno,cellno) = combo.value (this being each combo box from combobox1 onwards) next i as opposed to having to type out a routine for each combobox? Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
fill combobox depending on selection from another combobox | Excel Discussion (Misc queries) | |||
Combobox items determined by the selection in another combobox | Excel Programming | |||
Increment/Increment letter in alphabetical order | Excel Programming | |||
ComboBox list reliant on the entry from a different ComboBox | Excel Programming | |||
How Do I Load A ComboBox RowSource From The Results Of Another ComboBox | Excel Programming |