Option Explicit
Private Sub Workbook_Open()
MsgBox "You can right-click any worksheet cell" & vbCrLf & _
"to see and / or run your workbook's macros.", 64, "A tip:"
Run "RightClickReset"
Run "MakeMenu"
End Sub
Private Sub Workbook_Activate()
Run "RightClickReset"
Run "MakeMenu"
End Sub
Private Sub Workbook_Deactivate()
Run "RightClickReset"
End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Run "RightClickReset"
ThisWorkbook.Save
End Sub
Option Explicit
Private Sub RightClickReset()
On Error Resume Next
CommandBars("Cell").Controls("MY ADD-ON MENU").Delete
Err.Clear
CommandBars("Cell").Reset
End Sub
Private Sub MakeMenu()
Run "RightClickReset"
Dim objCntr As CommandBarControl, objBtn As CommandBarButton
Dim strMacroName$
Set objCntr = _
Application.CommandBars("Cell").Controls.Add(msoControlPopup, before:=1)
objCntr.Caption = "MY ADD-ON MENU"
End Sub
Run "SubroutineName"
SubroutineName