Try this -
Code:
Sub CreateMyShortcutMenu()
Dim newButton As CommandBarControl,Dim cmbRightClick As Office.CommandBar
Set cmbRightClick = CommandBars.Add("myRightClick", msoBarPopup, False, False)
Set newButton = cmbRightClick.Controls.Add(msoControlButton, 1, , , False)
With newButton
.style = msoButtonIconAndCaption
.Caption = "&Invoice" 'Menu caption
' .Picture = CurrentProject.path & "\Images\Invoice.png" ' Path to the picture
.OnAction = "=Invoice()"
End With
End Sub
To make this menu available in more than one forms, put the custom function in public module.
Code:
Public Function Invoice()
MsgBox "You clicked on Invoice"
End Function