Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Assign macro to custom menu
I wrote a macro to create a custom menu for a specific workbook. This menu is
not needed for any other workbook and is deleted upon closing. How do I assign, via code, a macro to run when this button is clicked? Thank you |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Assign macro to custom menu
In the code that creates the menu item, use the onaction property to assign
it to a macro. If you are fuzzy on the code, if after you create the menu, then turn on the macro recorder and do Tools-customize - leave the dialog displayed and right click on the bottm and assign a macro. Then drop the dialog and turn off the macro recorder. Look at the recorded code. -- Regards, Tom Ogilvy "Harley" wrote: I wrote a macro to create a custom menu for a specific workbook. This menu is not needed for any other workbook and is deleted upon closing. How do I assign, via code, a macro to run when this button is clicked? Thank you |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Assign macro to custom menu
You set the OnAction property of the control to your macro when creating it.
-- HTH Bob Phillips (replace xxxx in the email address with gmail if mailing direct) "Harley" wrote in message ... I wrote a macro to create a custom menu for a specific workbook. This menu is not needed for any other workbook and is deleted upon closing. How do I assign, via code, a macro to run when this button is clicked? Thank you |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
macro does not assign to menu? | Excel Discussion (Misc queries) | |||
Assign macro name to menu command w/o using workbook name | Excel Discussion (Misc queries) | |||
Assign macro to right click menu ? | Excel Programming | |||
Remove the filename when assign a macro to a menu command. | Excel Programming | |||
How to assign macro to menu button? | Excel Programming |