That works great. It so much cleaner doing it this was as before I was putting button bars on other sheets and assigning macros to those. Just a couple of questions (1) what is the find control ID 30010? Where do I find a list of numbers if such a list exists? (2) you have .FaceId = 123 as comment. Why is this a comment and if it was not a comment, what would this part of the code do? Thanks
Sub CreateMenu()
Dim HelpMenu As CommandBarControl
Dim NewMenu As CommandBarPopup
Dim MenuItem As CommandBarControl
Dim SubMenuItem As CommandBarButton
Call DeleteMenu
Set HelpMenu = CommandBars(1).FindControl(ID:=30010)
Set NewMenu = CommandBars(1).Controls.Add(Type:=msoControlPopup, _
Before:=HelpMenu.Index, temporary:=True)
NewMenu.Caption = "ABC &Reporting Group"
Set MenuItem = NewMenu.Controls.Add(Type:=msoControlButton)
With MenuItem
.Caption = "Trade Analysis"
'.FaceId = 123
.OnAction = "TradeAnalysis"
End With
Set MenuItem = NewMenu.Controls.Add(Type:=msoControlButton)
With MenuItem
.Caption = "Item 2"
'.FaceId = 123
.OnAction = "Macro2"
End With
End Sub
Bookmarks