new custom menu
Hello,
In office 2003; If I create a new toolbar. And I have a new menu item on this toolbar. Can I programatically add or remove items on this menu item? how can you do that? thanks |
new custom menu
You can,
Code to add a new Menu Item Sub MenuCreate() Dim mnMenu As Object Set mnMenu = CommandBars("Worksheet Menu Bar").Controls.Add(Type:=msoControlPopup, befo=5, temporary:=True) mnMenu.Caption = "Example" With mnMenu With .Controls 'the code below adds a button With .Add(msoControlButton) .Style = msoButtonIcon .FaceId = 463 .Caption = "About" .OnAction = "About" End With End With End With End Sub Any problems then let me know "greg" wrote in message ... Hello, In office 2003; If I create a new toolbar. And I have a new menu item on this toolbar. Can I programatically add or remove items on this menu item? how can you do that? thanks |
new custom menu
thanks
"DMc2007" wrote in message ... You can, Code to add a new Menu Item Sub MenuCreate() Dim mnMenu As Object Set mnMenu = CommandBars("Worksheet Menu Bar").Controls.Add(Type:=msoControlPopup, befo=5, temporary:=True) mnMenu.Caption = "Example" With mnMenu With .Controls 'the code below adds a button With .Add(msoControlButton) .Style = msoButtonIcon .FaceId = 463 .Caption = "About" .OnAction = "About" End With End With End With End Sub Any problems then let me know "greg" wrote in message ... Hello, In office 2003; If I create a new toolbar. And I have a new menu item on this toolbar. Can I programatically add or remove items on this menu item? how can you do that? thanks |
All times are GMT +1. The time now is 01:08 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com