cancel a procedure if the user clicked the Cancel button in a dialog box:
Sub dlg() If Dialogs(wdDialogFileOpen).show = 0 Then End End Sub