Create Drop Down List of Macros

Y

Youlan

Hello,

I'm using excel 2002.

I have 12 macros and I want to create a drop down list for these such that
when any one of the macro is selected from the list the procedure for that
macro is executed.

Any help would be greatly appreciated.

Regards,
 
G

Gord Dibben

You "want" this or just some way of accessing your macros?

To do what you want could be done with event code and some Case statements.

Might be easier to create a UserForm with a menu of 12 items.

Or a floating Toolbar with 12 buttons on it.

But.........event code it is.

With a DV dropdown list of your macros in A1

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Me.Range("A1")) Is Nothing Then Exit Sub

Select Case Target.Value
Case "A" 'more descriptive names should be used in place of A, B and C
AMacro
Case "B"
BMacro
Case "C"
CMacro
'add more to suit
End Select

End Sub


Gord Dibben MS Excel MVP
 

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