Select the Reflection Basic Editor before you run this procedure. No error message appears unless you remove the apostrophe from the line that sets ReportErrors equal to True. In either case, the script execution stops at the error.


Sub Main

With Application

'Run this script from the emulator with the Editor closed


'With this line you will see no error message.

.ReportErrors = False


'Remove the comment from this line to see an error message.

'.ReportErrors = True


'Try to open a non-existent settings file

.OpenSettings "JUNKFILE.XYZ"


'In either case, this message doesn't appear because the error

'stops the script.

MsgBox "Made it to the End"

End With

End Sub