Help on Message Box

B

Bart

I have an existing form that will ask for a message "IS THE STATUS CORRECT?"
when exiting the form. If the user select YES button, then the current form
will be closed, and when NO button is selected, the current form will remain
open.

Please help me to do this. Thanks in advance!
 
R

RonaldoOneNil

In the forms On Unload event put this code

If MsgBox("Is the Status Correct ?", vbYesNo, "Confirm") = vbNo Then
Cancel = True
End If
 
Top