K
kalle
Hi
How do I add a submenu to this?
Dim MyBar As CommandBar, MyItim As CommandBarControl
Set MyBar = CommandBars.Add(Name:="Sheet1menu", Position:=msoBarPopup,
Temporary:=True)
Set MyItim = MyBar.Controls.Add(Type:=msoControlButton)
With MyItim
.Caption = "Show"
.OnAction = "Macro1"
End With
Set MyItim = MyBar.Controls.Add(Type:=msoControlButton)
With MyItim
.Caption = "Show2"
.OnAction = "Macro2"
End With
This works fine but I want t ohave a submenu to the first one.
Thanks in advance
*** Sent via Developersdex http://www.developersdex.com ***
How do I add a submenu to this?
Dim MyBar As CommandBar, MyItim As CommandBarControl
Set MyBar = CommandBars.Add(Name:="Sheet1menu", Position:=msoBarPopup,
Temporary:=True)
Set MyItim = MyBar.Controls.Add(Type:=msoControlButton)
With MyItim
.Caption = "Show"
.OnAction = "Macro1"
End With
Set MyItim = MyBar.Controls.Add(Type:=msoControlButton)
With MyItim
.Caption = "Show2"
.OnAction = "Macro2"
End With
This works fine but I want t ohave a submenu to the first one.
Thanks in advance
*** Sent via Developersdex http://www.developersdex.com ***