I typucally stay away from macro.
Use the following code in the On Click event of your button
Command10 is the name of the command button, so you'll have to put yours there
Private Sub Command10_Click()
On Error GoTo Err_Command10_Click
If MsgBox("Exit program now?", vbYesNo + vbQuestion...