View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Wigi Wigi is offline
external usenet poster
 
Posts: 396
Default Determining what menu item called a macro

Hi

You can use the OnAction methode of a menu item, AND pass some parameters
along to a general procedure. I know it can be done since in the past I
already coded something in that spirit.

I just googled:

excel vba onaction parameter

and have a look at these links, and start with the article from MVP Tushar
Mehta.


--
Wigi
http://www.wimgielis.be = Excel/VBA, soccer and music


"Stephen Lloyd" wrote:

I'm creating an xla that will add a custom menu that will be added to the
main menu bar. My hope is to have several of the menu items actually tied to
the same macro which will run (portions of the) code conditionally based on
the calling menu item.

Is there a property to determine what menu item called a routine? If so,
what is it and are there any limitations I should be aware of? Any
additional information would be awesome...i.e., obect/collection information,
etc.

I didn't find much in Excel's help files.