Free for PREMIUM members
Private Sub Application_ItemContextMenuDisplay(ByVal CommandBar As Office.CommandBar, ByVal Selection As Selection)
Const msoControlButton = 1
Const msoButtonIconAndCaption = 3
Dim objButton As CommandBarButton
Set objButton1 = CommandBar.Controls.Add(msoControlButton)
.Style = msoButtonIconAndCaption
'Enter your caption text'
.Caption = "Hello World"
.Parameter = Selection.Item(1).EntryID
'List of face IDs here: http://www.kebabshopblues.co.uk/2007/01/04/visual-studio-2005-tools-for-office-commandbarbutton-faceid-property/'
.FaceId = 355
'Enter the macro you want to run. Be sure to include the Project and module names.'
.OnAction = "Project1.Module1.HelloWorld"
Open in new window
Please enter a first name
Please enter a last name
Must be at least 4 characters long.
Join and Comment
From novice to tech pro — start learning today.
Premium members can enroll in this course at no extra cost.
Premium members get this course for $95.20.
Premium members get this course for $99.99.
Premium members get this course for $108.00.
Premium members get this course for $151.20.
Premium members get this course for $159.20.