View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Doug Glancy[_7_] Doug Glancy[_7_] is offline
external usenet poster
 
Posts: 55
Default ListBox Selection to fire Macro

Kaye,

You can use data validation in the cell, with a list of your 13 choices.
Then in that sheet's code module insert a Worksheet_Change Event module.
Assuming your data validated cell is in A1 and your choices are "a", "b" and
"c" you could use code like this:

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("A1")) Is Nothing Then
Select Case Range("A1").Value
Case "a"
Call MacroA
Case "b"
Call MacroB
Case "c"
Call MacroC
End Select
End If
End Sub

hth,

Doug

"Kaye" wrote in message
...

Hi - Is it possible to have a dropdown box (listbox/combobox?) of 13
text choices, with each choice assigned to a macro?

Ideally I'd like to run one of 13 macros depending upon what the user
selects from this dropdown box.

My present method is using 13 checkboxes with a different macro
assigned to each - the user ticks it, and my macro fires. This though
is occupies too much screen area.

Any help would be appreciated.

Regards Kaye