View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default 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?