Ignore Errors through VBA


I have some VBA code that populates a spreadsheet, and it works well.  However, a couple of the cells have the Excel error message on them when it's finished.  (The little green triangle in the top left corner that you have to click "Ignore Error" on)  It doesn't matter which error it is, the data isn't going to be changed.

Is there a way to force Excel to ignore these incorrectly labeled errors through VBA so that the user doesn't have to go through and click "Ignore Error" on each cell?  If the answer is no, then that's fine.

LVL 13
Who is Participating?
Chris BottomleyConnect With a Mentor Software Quality Lead EngineerCommented:
Hello Torrwin,

Try the following but note it occurs at the application level


    With Application.ErrorCheckingOptions
        .BackgroundChecking = True
        .EvaluateToError = False
        .InconsistentFormula = False
    End With

Open in new window

TorrwinAuthor Commented:
Perfect!  Exactly what I was looking for!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.