Solution to "ListBox change calls a different macros"
Regarding: "http://excelexperts.com/listbox-and-list" and: "http://excelexperts.com/more-macros-listbox-items": How change in listbox value calls a different macro.
Create ActiveX ListBox and create a list of macros, like in the example file attached.
Put this code into your worksheet part:
Private Sub ListBox1_Click()
If ListBox1 = "Macro1" Then
Call Macro1
End If
If ListBox1 = "Macro2" Then
Call Macro2
End If
If ListBox1 = "Macro3" Then
Call Macro3
End If
If ListBox1 = "Macro4" Then
Call Macro4
End If
If ListBox1 = "Macro5" Then
Call Macro5
End If
End Sub
Attachment | Size |
---|---|
ListBoxMacro.xlsm | 20.15 KB |
ListBoxMacro2.jpg | 35.85 KB |
ListBoxMacro.jpg | 47.3 KB |
- Almir's blog
- Login or register to post comments
- 4674 reads
Recent comments
5 years 36 weeks ago
6 years 22 weeks ago
6 years 34 weeks ago
6 years 37 weeks ago
6 years 38 weeks ago
6 years 43 weeks ago
6 years 52 weeks ago
7 years 2 days ago
7 years 3 days ago
7 years 3 days ago