View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
dev dev is offline
external usenet poster
 
Posts: 66
Default Right click event

Thanks Chip - this worked great!!.

Do you know the ID for "Insert Copied Cells..."?

"Chip Pearson" wrote:

Dev,

Put the following code in the ThisWorkbook module.

Private WithEvents Ctrl As CommandBarButton

Private Sub Ctrl_Click(ByVal Ctrl As Office.CommandBarButton,
CancelDefault As Boolean)
MsgBox "Hello World"
End Sub

Private Sub Workbook_Open()
Set Ctrl = Application.CommandBars.FindControl(ID:=3125)
End Sub


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com




"Dev" wrote in message
...
How to capture "Clear Contents" Excel right click context menu
option.

I want to run a piece of code when user right clicks on a cell
and selects
"Clear Contents" context menu option.