Hi Jay,
>in a right-click pop-up menu button click?
I may be on an entirely wrong track,
but if I right-click in the menu bar,
I get a list of the available icon bars.
If you like, you can add a sub-menu or an additional icon bar.
But I'd rather make it accessible directly
by adding such a menu or an icon bar to the existing
menu bar or to an existing icon bar,
containing smallest possible macros
like "Macro001", "Macro002", "Macro003", connected to
a bigger macro and pass whatever parameters you like to it.
Be it defined in the smaller macros or be it defined
by a range, the selection, or whatever data are availabe.
Commandbarbutton.onAction seems to be only useful,
if you add Commandbarbuttons dynamically.
I wonder...
Sub Test001()
BigMacro "001"
End Sub
Sub Test002()
OnAction
BigMacro "002"
End Sub
Sub Test003()
BigMacro "003"
End Sub
Sub BigMacro(aStr As String)
MsgBox aStr
Application.CommandBars("NewMenu").Visible = False
End Sub
Greetings from Bavaria, Germany
Helmut Weber, MVP
"red.sys" & chr(64) & "t-online.de"
Word XP, Win 98
http://word.mvps.org/
Krithika Jaysree - 24 Jan 2005 11:47 GMT
Thanks for the reply
The reply would have been a good solution to us, had we known the number of items in our menu.
The number of items in the sub-menu is dynamic. so in this case we cannot hard code the parameters in the small macros. is there any other means to pass the arguments directly?