Hi, I have a string called errorMessage. If my VBA program incounters an error or a bad user input, the errorMessage string changes from blank to the error that is present. Throughout my program, I am constantly checking to see if the errorMessage string is still blank, see below:
Call resetWorkbookAndVerify
If errorMessage <> "" Then GoTo couldNotExecute
Call verifyUserIput
If errorMessage <> "" Then GoTo couldNotExecute
Call importData_FullList
If errorMessage <> "" Then GoTo couldNotExecute
Is there a way to immediately 'GoTo' when my string is not blank, or do I need to keep checking the errorMessage. I'm hope for something like the 'On Error GoTo' function, which will immediately 'GoTo' on any error, but rather 'GoTo' on any string value.
Bookmarks