Customising right click mouse menu

  • Thread starter Thread starter Tanveer
  • Start date Start date
T

Tanveer

Does anyone know how to customise the right-click mouse menu e.g. to ru
a macro you may have.

Please advice, I have heard this is possible but have no clue as to ho
to do this!

Cheers!
Ta
 
Tanveer

Need VBA code in the ThisWorkbook module of that workbook or perhaps
Personal.xls

This is a sample of code from an Add-in I use to load my global macros.

Sub Workbook_Open()
With Application.CommandBars("Cell").Controls.Add(temporary:=True)
.BeginGroup = True
.Caption = "Clear Formats"
.OnAction = "MyMacros.xla" & "!ClearFormatting"
End With
End Sub

I also use a Before_Close routine to delete the item when the Add-in closes.

Sub Workbook_BeforeClose(Cancel As Boolean)
Application.CommandBars("Cell").Controls("Clear Formats").Delete
End Sub

Some people will use the delete procedure in the Workbook_Open before adding
the item(s).

Gord Dibben Excel MVP
 
Back
Top