'Code from http://www.notesninjas.com answer% = Messagebox("Continue and close the " & _ "document?", 36, "Continue?") If answer% = 7 Then 'user has panicked and said No continue=False Exit Sub End If 'User still wants to close