ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Assigning Multiple Macros to One ComboBox Control (https://www.excelbanter.com/excel-programming/272468-re-assigning-multiple-macros-one-combobox-control.html)

Tim Zych[_2_]

Assigning Multiple Macros to One ComboBox Control
 
Another way:

Private Sub ComboBox1_Click()
Select Case ComboBox1.Value
Case "Value 1"
Call Macro1
Case "Value 2"
Call Macro2
Case "Value 3"
Call Macro3
End Select
End Sub

Hth,
Tim

"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





All times are GMT +1. The time now is 11:54 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com