Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Bob Phillips wrote:
Dim oCB As CommandBar Dim oCtl As CommandBarControl Dim strMenuName As String strMenuName = "My new menu" Set oCB = Application.CommandBars("Worksheet Menu Bar") On Error Resume Next ' Delete the menu if it already exists oCB.Controls(strMenuName).Delete On Error GoTo 0 ' Add the main menu Set oCtl = oCB.Controls.Add(Type:=msoControlPopup, temporary:=True) ' Add the submenu items With oCtl .Caption = strMenuName With .Controls.Add(Type:=msoControlButton) .Caption = "Save this worksheet" .OnAction = "cmdSaveMe" End With With .Controls.Add(Type:=msoControlButton) .Caption = "Hide this worksheet" .OnAction = "cmdHideMe" End With 'etc. End With Thanks everyone...that works for me! Cindi |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Unhide Main Menu Bar | Excel Worksheet Functions | |||
Main menu is missing | Excel Discussion (Misc queries) | |||
Why has my main menu bar suddenly disappeared? | Excel Discussion (Misc queries) | |||
Menu items added with menu item editor in older versions | Excel Discussion (Misc queries) | |||
How to remove an Excel Main Menu item inserted by .xla file | Excel Discussion (Misc queries) |