Syntax
Private Sub Chart_BeforeRightClick(Cancel As Boolean)
Enter
Code
End Sub
This event will run code after user right
clicks on this chart but before the default, right click action occurs.
Required Parameters
Cancel
The cancel parameter can be assigned a value
of true or false. Initially the value is
set to false. If the cancel parameter is assigned a value of true then the
default right click action will not happen.
Example
Private Sub Chart_BeforeRightClick(Cancel As Boolean)
Chart.Visible = xlSheetHidden
Cancel = True
End Sub
Result
The example will hide the chart before it is
right clicked and will not continue with the default right click function.