Chart.MouseMove event (Excel)
Occurs when the position of the mouse pointer changes over a chart.
expression.MouseMove (Button, Shift, x, y)
expression A variable that represents a Chart object.
|Button||Required||Long||The mouse button that was released. Can be one of the following XlMouseButton constants: xlNoButton, xlPrimaryButton, or xlSecondaryButton.|
|Shift||Required||Long||The state of the Shift, Ctrl, and Alt keys when the event occurred. Can be one of or a sum of values.|
|x||Required||Long||The x coordinate of the mouse pointer in chart object client coordinates.|
|y||Required||Long||The y coordinate of the mouse pointer in chart object client coordinates.|
The following table specifies the values for the Shift parameter.
|0 (zero)||No keys|
This example runs when the position of the mouse pointer changes over a chart.
Private Sub Chart_MouseMove(ByVal Button As Long, ByVal Shift As Long, ByVal X As Long, ByVal Y As Long) MsgBox "X = " & X & " Y = " & Y End Sub
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.