To create an event procedure that runs when the Change event occurs, set the OnChange property to [Event Procedure], and click the Build button .
Syntax
Private Sub controlname_Change( )
The Change event procedure has the following argument.
Argument | Description |
---|---|
controlname | The name of the control whose Change event procedure you want to run. |
Remarks
You can't cancel the Change event.
To prevent a cascading event, avoid creating a Change event procedure for a control that alters the control's contents (for example, by setting the control's Text property). If you do create such an event procedure, be sure to set a variable that prevents further changes while the current change is in progress.