View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 6,953
Default 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