MouseUp Event

Occurs when the user releases any of the mouse keys.

Syntax

object_MouseUp(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Double, ByVal Y As Double)

Properties

The MouseUp event syntax has these parts:

Part

Description

object

An object expression that evaluates to an object in the Applies To list.

Button

An integer value that identifies which mouse button was pressed.

Shift

The state of the SHIFT, CTRL, and ALT keys.

X

The horizontal position, in postscript points or logical units, from the left or top edge of the page where the mouse was pressed.

Y

The vertical position, in  postscript points or logical units, from the left or top edge of the page where the mouse was pressed.

Settings

The settings for Button are:

Value

Description

1

The left button was pressed.

2

The right button was pressed.

4

The middle button was pressed.

The settings for Shift are:

Value

Description

1

SHIFT was pressed.

2

CTRL was pressed.

3

SHIFT and CTRL were pressed.

4

ALT was pressed.

5

ALT and SHIFT were pressed.

6

ALT and CTRL were pressed.

7

ALT, SHIFT, and CTRL were pressed.

Remarks

The sequence of mouse-related events is:

MouseDown or MouseUp event procedures specify actions that occur when a mouse button is pressed or released. They enable you to distinguish between the left, right, and middle mouse buttons. You can also write code for mouse-keyboard combinations that use the SHIFT, CTRL, and ALT keyboard modifiers.

Use the Shift argument to identify the state of the SHIFT, CTRL, and ALT keys when the MouseDown or MouseUp event occurred. For example, if both CTRL and ALT are pressed, the value of Shift is 6.

Mouse events are sent to the selected object first. If there is no event script tied to the selected object, then the event is sent to the object's container (group or page).

 

Applies To