Adding Macro to each item in Combo Box

Joined
Apr 5, 2012
Messages
1
Reaction score
0
I have a combo box that has multiple items. I have already recorded a macro for each Item. What I want to do is run the macro that goes with the item selected in the combo box and have the macro ran by clicking a button. Any help or advice is greatly appreciated. Thank you. I also found this information in a different:

Sub DropDown_Click()
dim drpdwn as DropDown
set drpdwn = ActiveSheet.Dropdowns(Application.Caller)
Select Case drpdwn.ListIndex
Case 0
' no selection, do nothing
Case 1
' Item1 selected
Macro1
Case 2
' item2 selected
Macro20
Case 3
' item3 selected
Macro5
Case 4 to 14
' one of item 4 to 14 selected
Macro2B
End Select
End Sub

But im not really sure where to input this information. And can I assign this to a button?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top