BeforeRightClick Event

See Also         Example         Applies To

Occurs when an embedded chart or worksheet is right-clicked, before the default right-click action.

Syntax 1

Private Sub object_BeforeRightClick(Cancel As Boolean)

Syntax 2

Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As Boolean)

object   An object of type Chart declared with events in a class module. For more information, see Using Events with the Chart Object.

Target   The cell nearest to the mouse pointer when the right-click occurs.

Cancel   False when the event occurs. If the event procedure sets this argument to True, the default right-click action doesn't occur when the procedure is finished.

Remarks

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).