MouseUp

<< Click to Display Table of Contents >>

 

MouseUp

MouseUp(Button, ShiftState, MouseX, MouseY)

This event occurs when a previously clicked mouse button is released. Use the MouseUp event to determine specific actions to be triggered only when a mouse button is released.

Parameters of the MouseUp event

Name

Description

Button

Displays the pressed mouse button:

1: Mouse left button pressed

2: Mouse right button pressed

4: Mouse middle button pressed

ShiftState

Displays the pressed key along with the mouse button:

4: SHIFT key

8: CTRL key

12: CTRL + SHIFT keys

MouseX

Displays Screen's X coordinate where the mouse pointer was clicked

MouseY

Displays the Screen's Y coordinate where the mouse pointer was clicked

 

Example:

Sub InitialScreen_MouseUp(Button, ShiftState, MouseX, MouseY)
  ' Quits the application only when a user releases the mouse button.
  Application.Exit()
End Sub

Was this page useful?