Um, I got a stupid question.
I have an IF statement in my macro, which closes the window on ELSE. My only problem is that it keeps running...How can I stop it after the window was already closed?
If businessname = Empty Then businessname = InputBox("This field cannot be empty! Please enter the Merchant's Business Name:") Selection.find.ClearFormatting With Selection.find End With Selection.find.Execute Selection.TypeText Text:=businessname If businessname = Empty Then msgbox = ("This field cannot be empty! Please try again") [B] ActiveDocument.ActiveWindow.Close SaveChanges:=wdDoNotSaveChanges [/B] End If End If
I have whole bunch of other prompts and actions after this part of macro, which keeps working, even thought the window was closed.