BeforeRightClick Event
Collapse the table of content
Expand the table of content
The document is archived and information here might be outdated

DocEvents_Event.BeforeRightClick Event 

Occurs when a worksheet is right-clicked, before the default right-click action.

Namespace: Microsoft.Office.Interop.Excel
Assembly: Microsoft.Office.Interop.Excel (in

WithEvents docEvents_Event1 As DocEvents_Event
Function docEvents_Event1_BeforeRightClick(Target As Range, _
	Cancel As Boolean) As Void
	Handles docEvents_Event1.BeforeRightClick
End Function

event DocEvents_BeforeRightClickEventHandler BeforeRightClick;
 void add_BeforeRightClick(DocEvents_BeforeRightClickEventHandler handler);
 void remove_BeforeRightClick(DocEvents_BeforeRightClickEventHandler handler);
In JScript, you can handle the events defined by a class, but you cannot define your own.

Like other worksheet events, this event doesn't occur if you right-click while the pointer is on a shape or a command bar (a toolbar or menu bar).

Development Platforms

Windows XP Home Edition, Windows XP Professional, Windows Server 2003, and Windows 2000

Target Platforms

© 2016 Microsoft