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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top