No, actually...I didn't consider that. I had reset the menu in an
'auto' module instead. I'll give your advice a look. Thanks.
You could steer me in the right direction with a code snippet that
demonstrates a popup menu.
Ok.., here's some sample code that creates a custom popup commandbar
and adds menuitems to it. Following is how to implement it when your
workbook opens, AND how to use it when a cell on any sheet is
right-clicked.
===
In a standard module...
Sub MakeMyPopupMenu()
'Always delete in case it already exists
On Error Resume Next
CommandBars("MyPopupMenu").Delete
On Error GoTo 0
'Add a menu bar
With CommandBars.Add(Name:="MyPopupMenu", Position:=msoBarPopup)
'Add menuitems
With .Controls.Add(Type:=msoControlButton)
.Caption = "Menuitem&1" 'the menuitem
.OnAction = "RunMenuitem1" 'the procedure to run
.TooltipText = "Do this"
'.BeginGroup = True
End With
With .Controls.Add(Type:=msoControlButton)
.Caption = "Menuitem&2" 'the menuitem
.OnAction = "RunMenuitem2" 'the procedure to run
.TooltipText = "Do that"
'.BeginGroup = True
End With
With .Controls.Add(Type:=msoControlButton)
.Caption = "Menuitem&3" 'the menuitem
.OnAction = "RunMenuitem3" 'the procedure to run
.TooltipText = "Do other stuff"
.BeginGroup = True
End With
End With '//CommandBars.Add
End Sub
Sub RunMenuitem1()
MsgBox "You clicked Menuitem1! "
End Sub
Sub RunMenuitem2()
MsgBox "You clicked Menuitem2! "
End Sub
Sub RunMenuitem3()
MsgBox "You clicked Menuitem3! "
End Sub
===
In the Workbook_Open event
-OR- Sub Aut
pen in a standard module...
Call MakeMyPopupMenu
===
In the Worksheet_BeforeRightClick event...
Commandbars("MyPopupMenu").ShowPopup
Cancel = True '//cancel Excel's menus
Good luck!