Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel 2007 Menus
I am creating a menu with code that works in 03 to create a menu, and when I
call the routine, in Excel 07, the menu goes into the Add-Ins tab of the ribbon. If I Hide the ribbon with a different routine, the code does not make this section visible. Here is a section of the code: Code:
Dim myBar As CommandBar 'Dim SubItem As CommandBarButton Dim myItem As CommandBarControl On Error Resume Next 'In case it has already gone. Application.CommandBars("Navigation_Bar").Delete On Error GoTo 0 Set myBar = Application.CommandBars.Add(MenuBar:=True) With myBar .Name = "Navigation_Bar" .Visible = True '.Position=msoBarFloating 'Temporary:=True) End With 'Add Menu Item Set myItem = myBar.Controls.Add(Type:=msoControlPopup) With myItem .Caption = "Actions" .BeginGroup = True ' .FaceId = 334 End With 'First Sub Item Set mySubItem = myItem.Controls.Add(Type:=msoControlButton) With mySubItem .Caption = "Load Components" .OnAction = "Load_Components" End With Set mySubItem = myItem.Controls.Add(Type:=msoControlButton) With mySubItem .Caption = "Delete Navigation Bar" .OnAction = "Delete_Navigation_Bar" End With What I would like is a clean menubar with only items in it that I created like it works in 03. I would be open to another option, but hopefully not the full Ribbon... It takes up too much room... |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel 2007 Menus
Not possible. The ribbon is not as configurable as the old commandbars. You
either have it all or nothing. You can create your own group using XML, but it will still be part of a full ribbon. -- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "JasonB" wrote in message ... I am creating a menu with code that works in 03 to create a menu, and when I call the routine, in Excel 07, the menu goes into the Add-Ins tab of the ribbon. If I Hide the ribbon with a different routine, the code does not make this section visible. Here is a section of the code: Code:
Dim myBar As CommandBar 'Dim SubItem As CommandBarButton Dim myItem As CommandBarControl On Error Resume Next 'In case it has already gone. Application.CommandBars("Navigation_Bar").Delete On Error GoTo 0 Set myBar = Application.CommandBars.Add(MenuBar:=True) With myBar .Name = "Navigation_Bar" .Visible = True '.Position=msoBarFloating 'Temporary:=True) End With 'Add Menu Item Set myItem = myBar.Controls.Add(Type:=msoControlPopup) With myItem .Caption = "Actions" .BeginGroup = True ' .FaceId = 334 End With 'First Sub Item Set mySubItem = myItem.Controls.Add(Type:=msoControlButton) With mySubItem .Caption = "Load Components" .OnAction = "Load_Components" End With Set mySubItem = myItem.Controls.Add(Type:=msoControlButton) With mySubItem .Caption = "Delete Navigation Bar" .OnAction = "Delete_Navigation_Bar" End With What I would like is a clean menubar with only items in it that I created like it works in 03. I would be open to another option, but hopefully not the full Ribbon... It takes up too much room... |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel 2007 Menus
but it will still be part of a full ribbon.
startFromScratch? -- Jim "Bob Phillips" wrote in message ... | Not possible. The ribbon is not as configurable as the old commandbars. You | either have it all or nothing. | | You can create your own group using XML, but it will still be part of a full | ribbon. | | -- | HTH | | Bob | | (there's no email, no snail mail, but somewhere should be gmail in my addy) | | "JasonB" wrote in message | ... | I am creating a menu with code that works in 03 to create a menu, and when | I | call the routine, in Excel 07, the menu goes into the Add-Ins tab of the | ribbon. If I Hide the ribbon with a different routine, the code does not | make this section visible. Here is a section of the code: | | | Code:
Dim myBar As CommandBar | 'Dim SubItem As CommandBarButton | Dim myItem As CommandBarControl | | On Error Resume Next 'In case it has already gone. | Application.CommandBars("Navigation_Bar").Delete | On Error GoTo 0 | | Set myBar = Application.CommandBars.Add(MenuBar:=True) | With myBar | .Name = "Navigation_Bar" | .Visible = True | '.Position=msoBarFloating | 'Temporary:=True) | End With | 'Add Menu Item | Set myItem = myBar.Controls.Add(Type:=msoControlPopup) | With myItem | .Caption = "Actions" | .BeginGroup = True | ' .FaceId = 334 | End With | | 'First Sub Item | Set mySubItem = myItem.Controls.Add(Type:=msoControlButton) | With mySubItem | .Caption = "Load Components" | .OnAction = "Load_Components" | End With | Set mySubItem = myItem.Controls.Add(Type:=msoControlButton) | With mySubItem | .Caption = "Delete Navigation Bar" | .OnAction = "Delete_Navigation_Bar" | End With | | What I would like is a clean menubar with only items in it that I created | like it works in 03. I would be open to another option, but hopefully not | the full Ribbon... It takes up too much room... | | |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Sub-menus of main menus for Excel 2007 | New Users to Excel | |||
Excel 2007 menus - how can I get rid of them? | New Users to Excel | |||
EXCEL 2007 Menus | Excel Discussion (Misc queries) | |||
Excel 2007 menus - XML Notepad 2007 | Excel Programming | |||
Excel 2007 menus - is this right? | Excel Programming |