Syntax
Private Sub Chart_MouseDown(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 button
is pressed while the pointer is over a chart.
Required Parameters
Button
The button parameter returns the value of the
mouse button that was pressed. 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 button was pressed. The parameter can return a value for a single
key or a value that represents the sum of multiple keys. More information about
the key values can be found at Shift Parameter Values.
X
The x parameter returns the horizontal
coordinate of where the mouse pointer was when the mouse button was pressed.
Y
The y parameter returns the vertical
coordinate of where the mouse pointer was when the mouse button was pressed.
Example
Private Sub Chart_MouseDown(ByVal Button As Long, _
ByVal Shift As Long, ByVal X As Long, ByVal Y
As Long)
MsgBox "Button = " & Button
& chr$(13) & _
"Shift = " & Shift &
chr$(13) & _
"X = " & X & " Y =
" & Y
End Sub
Result
This example runs when a mouse button is
pressed while the pointer is over a chart.