Events with Embedded Charts : Chart Event « Excel « VBA / Excel / Access / Word






Events with Embedded Charts

 
Private Sub myChartClass_DragOver()
    Range("A1").Value = "You have activated the DragOver() sub procedure."
End Sub
Private Sub myChartClass_DragPlot()
    Range("A2").Value = "You have activated the DragPlot() sub procedure."
End Sub
Private Sub myChartClass_MouseDown(ByVal Button As Long, ByVal Shift As Long, ByVal x As Long, ByVal y As Long)
    Range("A3").Value = "You have activated the MouseDown() sub procedure."
End Sub
Private Sub myChartClass_MouseMove(ByVal Button As Long, _
           ByVal Shift As Long, ByVal x As Long, ByVal y As Long)
    Range("L34").Value = "You have activated the MouseMove() sub procedure."
End Sub
Private Sub myChartClass_MouseUp(ByVal Button As Long, ByVal Shift As Long, ByVal x As Long, ByVal y As Long)
    Range("L34").Value = "You have activated the MouseUp() sub procedure."
End Sub
Private Sub myChartClass_Select(ByVal ElementID As Long,ByVal Arg1 As Long, ByVal Arg2 As Long)
    If ElementID = 3 And Arg2 > 0 Then
        ActiveChart.SeriesCollection(Arg1).Points(Arg2).ApplyDataLabels Type:=xlShowValue
    End If
End Sub

Private Sub myChartClass_Resize()
    Range("A2").Value = "You have activated the Resize() sub procedure."
End Sub
Private Sub myChartClass_SeriesChange(ByVal SeriesIndex As Long,ByVal PointIndex As Long)
        Range("A3").Value = "You have activated the SeriesChange() sub procedure."
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 Chart Sheets
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