Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
dynamically assigning to a combo box
Forgive me as I am new to VB. I am trying to assign items to multiple combo
box lists, selecting the combo box dynamically. There has to be a very simple way to set a string or value into the parent object of the combo box that will then dynamically set the combo box object itself. In a simple version, I am trying to set values into combo boxes named ProductList1 to ProductList10: Private Sub LoadComboBox_Click() Dim i As Integer For Each validcell In Worksheets("Product List").Range("A2:A100") For i = 1 To 10 If validcell.Value 0 Then ' This of course will work ProductList1.AddItem validcell ' As will this Me.[ProductList1].AddItem validcell ' What I need is this Me.["ProductList" & i].AddItem validcell End If Next i Next cell End Sub This has to be an easy solution, I am just not familiar with the syntax. Many thanks in advance. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
dynamically assigning to a combo box
HTH ' What I need is this Me.Controls("ProductList" & i).AddItem validcell |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
linking a form combo box... results from the combo box to another | Excel Discussion (Misc queries) | |||
"Combo Box - getting control combo box to stick in place in worksh | Excel Discussion (Misc queries) | |||
"Combo Box - getting control combo box to stick in place in worksh | Excel Discussion (Misc queries) | |||
Create combo box dynamically | Excel Programming | |||
how to add a combo box in to a excel cell using VBA dynamically? | Excel Programming |