Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
HI,
in the following code I create a custom menu but I would like to have the shortcut to be set for the button and written in the menu. I can't find where to put them ? Can someone advise, thanks a lot Dim cbar As Office.CommandBar Dim monoutil As CommandBarControl Dim menu1, cbctl1, cbctl2, cbctl3, cbctl4 As CommandBarControl Dim sub1, sub2, sub3 As CommandBarButton 'create a control popup on the main Worksheet menu bar Set monoutil = Application.CommandBars("worksheet menu bar").Controls.Add(Type:=msoControlPopup) monoutil.Caption = "&Sbops-Tool 1.0" monoutil.Visible = True 'add a menu item Set cbctl1 = monoutil.Controls.Add(Type:=msoControlButton) With cbctl1 .Visible = True .Style = msoButtonIconAndCaption .Caption = "Create an import File" ' is required for caption .OnAction = ThisWorkbook.Name & "! outils.importfile" 'action to perform .FaceId = 2670 End With |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Worksheet Shortcut Menu | Excel Discussion (Misc queries) | |||
What is a shortcut menu? | Excel Discussion (Misc queries) | |||
Popup Menu / Shortcut Menu | Excel Discussion (Misc queries) | |||
Alt Shortcut from right-click menu | Excel Discussion (Misc queries) | |||
shortcut menu | Excel Discussion (Misc queries) |