| title | Chart.MouseUp event (Excel) | |
|---|---|---|
| keywords | vbaxl10.chm500077 | |
| f1_keywords |
|
|
| api_name |
|
|
| ms.assetid | 45281aac-a4f6-390d-e767-a4fe2ee670fc | |
| ms.date | 04/16/2019 | |
| ms.localizationpriority | medium |
Occurs when a mouse button is released while the pointer is over a chart.
expression.MouseUp (Button, Shift, x, y)
expression A variable that represents a Chart object.
| Name | Required/Optional | Data type | Description |
|---|---|---|---|
| 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. |
Nothing
The following table specifies the values for the Shift parameter.
| Value | Description |
|---|---|
| 0 (zero) | No keys |
| 1 | Shift key |
| 2 | Ctrl key |
| 4 | Alt key |
This example runs when a mouse button is released over a chart.
Private Sub Chart_MouseUp(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[!includeSupport and feedback]