I want to be able to either trap errors in my code or skip errors using "on error resume next" depending on the value of a cell (0 or 1). I have put the following code in at the beginning of my macro:
But this does not seem to work and always "resumes next" as I guess this comes after the ErrHandler line. Any ideas on how I can do this?
Thanks in advance
Code:
If Sheets("Report Creation").Range("f7") = 1 Then On Error GoTo ErrHandler Else
On Error Resume Next
But this does not seem to work and always "resumes next" as I guess this comes after the ErrHandler line. Any ideas on how I can do this?
Thanks in advance