J
JasonB
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:
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...
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...