Hy joe letme give an exemple
this will create a button on the rigth click menu all you have to do is to replace the names here
------------------------------------------------------------------------
Private Sub Workbook_Deactivate()
On Error Resume Next
With Application
.CommandBars("Cell").Controls("My Macro").Delete
End With
On Error GoTo 0
End Sub
Private Sub Workbook_SheetBeforeRightClick(ByVal Sh As Object, ByVal Target As Range, Cancel As Boolean)
Dim cBut As CommandBarButton
On Error Resume Next
With Application
.CommandBars("Cell").Controls("My Macro").Delete
Set cBut = .CommandBars("Cell").Controls.Add(Temporary:=True)
End With
With cBut
.Caption = "My Macro"
.Style = msoButtonCaption
.OnAction = "My_Macro"
End With
On Error GoTo 0
________________________________________
|