Change Event (ToolBar, Slider Controls)

       

Indicates that the contents of a control have changed. How and when this event occurs varies with the control.

Syntax

Private Sub object_Change([index As Integer])

The Change event syntax has these parts:

Part Description
object An object expression that evaluates to a control in the Applies To list.
index An integer that uniquely identifies a control if it's in a control array.

Remarks

The Change event procedure can synchronize or coordinate data display among controls. For example, you can use a Slider control's Change event procedure to update the control's Value property setting in a TextBox control. Or you could use a Change event procedure to display data and formulas in a work area and results in another area.

Note A Change event procedure can sometimes cause a cascading event. This occurs when the control's Change event alters the control's contents by setting a property in code that determines the control's value, such as the Text property setting for a TextBox control. To prevent a cascading event: