Thread: CommandBars
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default CommandBars

You could add all of the controls individually, but I am not aware how you
could add the whole menu.

To add the help menu as an example

Application.CommandBars("Worksheet Menu
Bar").Controls("MyMenu").Controls.Add ID:=30010, Temporary:=True

or

Dim myControl As CommandBarControl
Dim myID As Long

Set myControl = Application.CommandBars("Worksheet Menu
Bar").Controls("myMenu")
myID = Application.CommandBars("cell").Controls("Format cells...").ID
myControl.Controls.Add ID:=myID, temporary:=True

Check here for a list of IDs
http://support.microsoft.com/default...b;en-us;159466
XL97: List of ID Numbers for Built-In Command Bar Controls


--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"defj" wrote in message
...
Is there an easy way to add one existing Menu as a subMenu
to another? I tried the logical .control.Add way and got
nowhere.