1999-08-21 Events 0 67
Events for the chart object occurs when the user activates or changes a chart. Events in charts are activated by default, but can be deactivated by a macro. To display the event procedures for a chart you use the Visual Basic editor.
Select the desired project in the Project-window and activate the chart object you want by doubleclicking it. Any event procedures in the chart will now be displayed in the Code-window on the right side of the screen. You can create a new event procedure by selecting Chart in the Object dropdown, and then select an event in the Procedure dropdown.
Macros can be attached to the following events in a chart:
Private Sub Chart_Select(ByVal ElementID As Long, ByVal Arg1 As Long, ByVal Arg2 As Long) ActiveChart.Deselect End Sub