Visual Basic Reference
Occurs before the focus shifts to a (second) control that has its CausesValidation property set to True.
Private Sub object_Validate(KeepFocus As Boolean)
The Validate event syntax has these parts:
|object||An object expression that evaluates to an object in the Applies To list.|
|KeepFocus||Value that determines if the control loses focus. Setting KeepFocus to True specifies that the control retains the focus.|
The Validate event works in tandem with the CausesValidation property to prevent a control from losing the focus until certain criteria are met.
Important The Validate event only occurs when the control which is about to receive the focus has its CausesValidation property set to True.