Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Dynamic combo box
Hello all,
Is it possible to have the'List Fill Range" in a combo box change depending on the value of another cell. i.e. if the user selects February, the list fill range is C3:C9, if March is selected C10:C25, etc. Thanks in advance |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Dynamic combo box
You can check the listindex in Combobox1 and fill in the list in combobox2
Private Sub UserForm_Initialize() Application.EnableEvents = False ComboBox1.List = Range("z1:z3").Value ComboBox2.List = Range("a1:a3").Value ComboBox1.ListIndex = 0 ComboBox2.ListIndex = 0 Application.EnableEvents = True End Sub Private Sub ComboBox1_Change() ComboBox2.Clear If ComboBox1.ListIndex = 0 Then ComboBox2.List = Range("a1:a3").Value If ComboBox1.ListIndex = 1 Then ComboBox2.List = Range("b1:b3").Value If ComboBox1.ListIndex = 2 Then ComboBox2.List = Range("c1:c3").Value ComboBox2.ListIndex = 0 End Sub -- Regards Ron de Bruin (Win XP Pro SP-1 XL2002 SP-2) www.rondebruin.nl "TO" wrote in message ... Hello all, Is it possible to have the'List Fill Range" in a combo box change depending on the value of another cell. i.e. if the user selects February, the list fill range is C3:C9, if March is selected C10:C25, etc. Thanks in advance |
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) | |||
Dynamic Combo Box | Excel Worksheet Functions | |||
"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) | |||
dynamic combo boxes | Excel Worksheet Functions |