ukdane
11-12-2008, 12:36 PM
I have my own menus in Excel 2000, as can be seen in the example below.
Set myCommandBarCtl = myBar.Controls.Add(Type:=msoControlButton)
With myCommandBarCtl
.BeginGroup = True
.Style = msoButtonCaption
.Caption = "Oprette Link"
.TooltipText = "Link til arkiv folder"
.OnAction = "addlink"
End With
However a user has asked if it is possible to add a keyboard shortcut to run the code, instead of having to use the mouse to navigate.
Is there a quick addition I can make to the code above to solve the problem, or will I have to create a new Macro for each shortcut?
Set myCommandBarCtl = myBar.Controls.Add(Type:=msoControlButton)
With myCommandBarCtl
.BeginGroup = True
.Style = msoButtonCaption
.Caption = "Oprette Link"
.TooltipText = "Link til arkiv folder"
.OnAction = "addlink"
End With
However a user has asked if it is possible to add a keyboard shortcut to run the code, instead of having to use the mouse to navigate.
Is there a quick addition I can make to the code above to solve the problem, or will I have to create a new Macro for each shortcut?