it’s probably an easy solution for my problem and I hope sb can help me.
I’m opening a Dialog Box in the beginning of my macro with Dialogs(wdDialogFileOpen).Show and now I would like to add an If clause that if that Dialog box is closed, the macro stops/exits. I’m not so familiar with the VBA syntax.
Thanks!
Dialog boxes return the following:
The Close button. –> -2
The OK button. –> -1
The Cancel button. –> 0 (zero)
A command button: 1 is the first button, 2 is the second button, and so on. –> > 0 (zero)
SO: