Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

MouseMove Event [Excel 2003 VBA Language Reference]

Office 2003

Occurs when the position of the mouse pointer changes over a chart.

Private Sub object_MouseMove(ByVal Button As Long, ByVal Shift As Long, ByVal X As Long, ByVal Y As Long)

object An object of type Chart declared with events. For more information, see Using Events with Embedded Charts.

Button The mouse button that was pressed. Can be one of the following XlMouseButton constants: xlNoButton, xlPrimaryButton, xlSecondaryButton, or xlMiddleButton.

Shift The state of the SHIFT, CTRL, and ALT keys when the event occurred. Can be one of or a sum of the following values.

Value Meaning
0 (zero) No keys
1 SHIFT key
2 CTRL key
4 ALT key

X The X coordinate of the mouse pointer in chart object client coordinates.

Y The Y coordinate of the mouse pointer in chart object client coordinates.

Example

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
		


Applies to | Chart Object



Show:
© 2014 Microsoft