Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Right click event
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. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Right click event
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. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Right click event
I think I got it... it's 3181
"Dev" wrote: 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. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
userform label double-click goes to click event | Excel Programming | |||
On Click Event | Excel Programming | |||
Click event to run only once | Excel Programming | |||
Click event to run only once | Excel Programming | |||
Click event to run only once | Excel Programming |