Click Event  
 

The Click event is generated when the user presses and releases a mouse button.

Syntax

Sub object_Click( [Index As Integer] )

Remarks

The Click event is generated when the user presses and releases the mouse button anywhere over the control's window. To distinguish between the user pressing the left or right mouse buttons, use the MouseDown and MouseUp events. To determine the column and row in the virtual display where the mouse button was clicked, check the MouseX and MouseY properties.

When debugging events, do not use message boxes to show when the event occurred, as this will interfere with the normal functioning of many events. For example, displaying a message box in the Click event may prevent the DblClick event from being raised.

See Also

MouseX Property, MouseY Property, DblClick Event, MouseDown Event, MouseUp Event