After you select
View Code, you are taken directly into the VBE (Visual Basic Editor) where you can start entering the event procedure code:
Chart_Activate event procedure runs when a chart sheet is activated or changed.
Activate Event Example:
Private Sub Chart_Activate() MsgBox "The chart is activated" End Sub
Chart_Deactivate event procedure runs when a chart sheet is deactivated. For example when you open another sheet.
Deactivate Event Example:
Private Sub Chart_Deactivate() MsgBox "Chart Deactivated" End Sub
Chart_Calculate event procedure runs when a new or changed data is plotted on a chart.
Calculate Event Example:
Private Sub Chart_Calculate() MsgBox "Chart re-calculated" End Sub
Chart_Resize event procedure runs when you resize a chart using the resize handles.
Chart Resize Event Example:
Private Sub Chart_Resize() MsgBox "Chart resized" End Sub
Note: This event does not work in Excel 2007 and later.
Chart_SeriesChange event procedure runs when a chart data point is changed. This procedure has two arguments:
The offset in the Series collection of updated series
The offset in the Point collection of updated points
Chart SeriesChange Event Example:
Private Sub Chart_SeriesChange(ByVal SeriesIndex As Long, ByVal PointIndex As Long) 'Not works in Excel 2007 and later. End Sub