Creating an entirely new and separate shortcut menu
Sub CreateShortcut()
Set myBar = CommandBars.Add _
(name:="MyShortcut", Position:=msoBarPopup, _
Temporary:=True)
Set myItem = myBar.Controls.Add(Type:=msoControlButton)
With myItem
.Caption = "&Number Format..."
.OnAction = "ShowFormatNumber"
.FaceId = 1554
End With
Set myItem = myBar.Controls.Add(Type:=msoControlButton)
With myItem
.Caption = "&Alignment..."
.OnAction = "ShowFormatAlignment"
.FaceId = 217
End With
Set myItem = myBar.Controls.Add(Type:=msoControlButton)
With myItem
.Caption = "&Font..."
.OnAction = "ShowFormatFont"
.FaceId = 291
End With
End Sub
Related examples in the same category