Code:
Method One (Would you like to exit with two buttons):
Method Two (Would you like to save with three buttons):
Method One (Would you like to exit with two buttons):
Dim result as msgboxresult = msgbox("Are you sure you would like to exit?", vbyesno) Select Case result Case vbYes end Case vbNo e.cancel=true End Select
Method Two (Would you like to save with three buttons):
Dim result as msgboxresult = msgbox("Are you sure you would like to save before exiting?", vbyesnocancel) Select Case result Case vbYes 'Your saving code here end Case vbNo end Case vbCancel e.cancel=true End Select