Events with Chart Sheets : Chart Event « Excel « VBA / Excel / Access / Word






Events with Chart Sheets

 
Private Sub Chart_Select(ByVal ElementID As Long, ByVal Arg1 As Long, _
                         ByVal Arg2 As Long)
    If ElementID = 3 And Arg2 > 0 Then
        With ActiveChart.SeriesCollection(Arg1).Points(Arg2)
            .ApplyDataLabels Type:=xlShowValue
        End With
     End If
End Sub

 








Related examples in the same category

1.Understanding Chart Events
2.Chart_Deactivate procedure also displays a message only when the chart sheet is deactivated:
3.The Chart_Select procedure listed next is executed whenever an item on the chart is selected:
4.Events with Embedded Charts
5.Chart double click event
6.hides the legend when it is double-clicked; double-clicking either axis brings back the legend:
7.zooms in on a left mouse click and zooms out on a right mouse click.
8.Embedded Chart Mouse Events