Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Assigning Multiple Macros to One ComboBox Control
Private Sub UserForm_Initialize()
ComboBox1.AddItem "Item 1" 'ListIndex = 0 ComboBox1.AddItem "Item 2" 'ListIndex = 1 ComboBox1.AddItem "Item 3" 'ListIndex = 2 End Sub Private Sub ComboBox1_Change() Select Case ComboBox1.ListIndex Case 0 MsgBox "Item 1 was selected" Case 1 MsgBox "Item 2 was selected" Case 2 MsgBox "Item 3 was selected" Case Else MsgBox "Error" End Select End Sub -- Michael J. Malinsky "Chas" wrote in message ... Hi, Need some guidance on this one. Have a combobox with three selections. Also have three macros, one for each combobox selection. I've tried selecting the combobox and assigning the macro but this only assigns one macro to the whole combobox. So only the macro assigned runs no matter which item is selected in the combobox. How do I assign a different macro to each combobox selection? Thanks in advance for your help! Chas |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
form control combobox | Excel Discussion (Misc queries) | |||
Control ToolBox ComboBox | Excel Discussion (Misc queries) | |||
Disable and enable dropdown combobox(Form Control) | Excel Discussion (Misc queries) | |||
HELP PLEASE..Inserting combobox (ActiveX control) makes workbook c | Excel Discussion (Misc queries) | |||
Assigning the name of a userform/control to a changing string | Excel Programming |