0

I have a bunch of vba code that was written using the .Raise and On Error methods to deal with exceptions. In most cases this works well, but in some functions we want the execution to continue notwithstanding the exception. In such cases, the developers used On Error GoTo 0. The issue is that execution continues only after the error message box is dismissed.

Thus my question is: is there a way to suppress all message boxes created by the .Raise method for a certain range of code? I've tried Application.DisplayAlerts = False but the alerts from .Raise are still displayed.

Thanks!

1 Answers1

0

On Error GoTo 0 restores the normal error handling. You use it to cancel a previously set On Error Goto ....

What you want is On Error Resume Next.

Community
  • 1
  • 1
GSerg
  • 76,472
  • 17
  • 159
  • 346