devxlogo

Avoiding the Validation When the User Presses Cancel

Avoiding the Validation When the User Presses Cancel

I have very simple way to do this with just one line of code. Place the following line in the proper position, often the first line in LostFocus event (assuming the cancel control is named CancelControl).

 If activeControl is CancelControl then exit Sub

size=3>
This tip is also suitable for VB5.

devx-admin

Share the Post: