Help on Message Box

  • Thread starter Thread starter Bart
  • Start date Start date
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!
 
In the forms On Unload event put this code

If MsgBox("Is the Status Correct ?", vbYesNo, "Confirm") = vbNo Then
Cancel = True
End If
 
In the forms On Unload event put this code

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