Syntax
Private Sub Chart_MouseMove(ByVal Button As Long, ByVal Shift As Long, ByVal x As Long, ByVal y As Long)
Enter
Code
End Sub
This event will run code when a mouse pointer
is moved over the chart.
Required Parameters
Button
The button parameter returns the value of the
mouse button that was being pressed while the mouse pointer was moving over the
chart. The parameter will return one of the three values. More information
about the three values can be found at Mouse Button Values.
Shift
The shift parameter will return a value
depending on which key was pressed when the mouse pointer was moved over the
chart. The parameter can return a value
for a single key or a value that represents the sum of multiple keys that were
pressed. More information about the key values can be found at Shift ParameterValues.
X
The x parameter returns the horizontal
coordinate of where the mouse pointer is when it is pointed over the chart.
Y
The y parameter returns the vertical
coordinate of where the mouse pointer is when it is pointed over the chart.
Example
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
Result
This example runs when the position of the mouse
pointer changes over a chart.