You need to add the menu to two menu bars, so it takes two statements, or a
loop.
Dim myMenu As Object
dim vMenuBars as variant
dim iMenu as integer
vMenuBars = Array("Worksheet Menu Bar", "Chart Menu Bar")
For iMenu = 0 to 1
Set myMenu =
CommandBars(vMenuBar(iMenu)).Controls.Add(Type:=ms oControlPopup)
With myMenu
.Caption = "User defined charts"
' etc.
End With
Next
- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______
"Fredrik E. Nilsen" wrote in message
...
On Mon, 12 Feb 2007 13:03:06 -0000, "Bob Phillips"
wrote:
Repeat the code that you have changing Worksheet Menu bar to Chart Menu
Bar
in the second instance of that code.
Thanks, I figured out I could do it like that. But it seems strange to
me if there is no method to achieve this in one statement?
--
Fredrik E. Nilsen