Chart BeforeDoubleClick Event



Syntax
Private Sub Chart_BeforeDoubleClick(ByVal ElementID As Long, ByVal Arg1 As Long, ByVal Arg2 As Long, Cancel As Boolean)
Enter Code
End Sub

This event will run when a chart is double clicked before the default double click action.

Required Parameters
Cancel
When this event occurs this value is set to False. If this parameter is set to True, the default double-click action will not perform when the procedure is finished.

Arg1
Additional event information, depending on the value of ElementID. For more information about this parameter, see the Chart Arguments.

Arg2
Additional event information, depending on the value of ElementID. For more information about this parameter, see the Chart Arguments.

ElementID
The double-clicked object. The value of this parameter determines the expected values of Arg1 and Arg2. For more information about this parameter, see the Chart Arguments.

Example
Private Sub Chart_BeforeDoubleClick(ByVal ElementID As Long, _
ByVal Arg1 As Long, ByVal Arg2 As Long, Cancel As Boolean)

If ElementID = xlFloor Then
Cancel = True
MsgBox "Chart formatting for this item is restricted."
End If

End Sub

Result
This example overrides the default double-click behavior for the chart floor.