Customizing VB Macro on Menu Bar
Tommy,
Yes, this is the sort of thing
Dim cbMainMenuBar As CommandBar
Dim cbcCustomMenu As CommandBarControl
Set cbMainMenuBar = Application.CommandBars("Worksheet Menu Bar")
Set cbcCustomMenu = cbMainMenuBar.Controls("MyMenu")
With cbcCustomMenu.Controls.Add(Type:=msoControlButton)
.Caption = "An extra item"
.OnAction = "macro99"
End With
--
HTH
Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
"Tommy T" wrote in message
...
Using your example, is there a way for another different workbook to add a
4th item to this custom menu?
|