Show AllShow All

Click Event

The Click event occurs only if it has been defined for a control in the Script Editor.

The TabStrip and MultiPage controls do not support the Click event. However, individual the Page objects of the MultiPage control do support the click event.

ScrollBars and SpinButtons do not support the Click event but you can bind them to fields and use the CustomPropertyChange event.

Syntax

Sub object_Click( )

The Click event syntax has these parts:

Part Description
object Required. A valid object.

Example:

Sub CommandButton1_Click()
    MsgBox "You just clicked my button! "
End Sub
		

ShowRemarks

Example:

Sub Item_PropertyChange(ByVal Name)
Set MyListBox = Item.GetInspector.ModifiedFormPages("Message").Controls("ListBox1")
Select Case Name
    Case "Mileage"
        Item.CC = MyListBox.Value
        Item.Subject = MyListBox.Value
    Case Else
End Select
End Sub