ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Create Drop Down List of Macros (https://www.excelbanter.com/excel-discussion-misc-queries/246440-create-drop-down-list-macros.html)

Youlan

Create Drop Down List of Macros
 
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,

smartin

Create Drop Down List of Macros
 
Youlan wrote:
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,


Do they appear when you pres Alt+F8?

Gord Dibben

Create Drop Down List of Macros
 
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

On Fri, 23 Oct 2009 14:55:02 -0700, Youlan
wrote:

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,




All times are GMT +1. The time now is 06:28 AM.

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