#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default CommandBars

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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
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.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default CommandBars

As an example, this adds the tools menu as a sub-menu under the Data menu:

Application.CommandBars("Data").Controls.Add _
Type:=msoControlPopup, _
Id:=30007, Befo=6

--
Regards,
Tom Ogilvy


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.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel CommandBars Daniel Utsch[_2_] Excel Discussion (Misc queries) 3 December 14th 08 07:17 PM
List of CommandBars & Control IDs Silena K-K Excel Discussion (Misc queries) 5 May 28th 08 08:45 PM
Saving CommandBars DRA Excel Discussion (Misc queries) 0 November 21st 06 11:28 PM
Built in Commandbars Dave Martin Excel Programming 2 August 31st 03 03:47 AM
Built In CommandBars Sander Lablans Excel Programming 0 August 1st 03 11:59 AM


All times are GMT +1. The time now is 10:56 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"