Ignore Errors through VBA

Posted on 2010-01-07
Last Modified: 2012-05-08

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.

Question by:Torrwin
    LVL 59

    Accepted Solution

    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

    LVL 13

    Author Closing Comment

    Perfect!  Exactly what I was looking for!

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    A2 = A1 That kind of cell reference is relative.  If you copy it from A2 to B2, then B2 will get this: B2 = B1 That's all fine and good, but if you then insert a new row above row 2, you'll find: A3 = A1 B3 = B1 This is intentional. …
    Drop Down List with Unique/Distinct Values (Part II - ComboBox or ListBox and Data Validation List Bonus!) David Miller (dlmille) Intro This article focuses on delivering unique, sorted lists to list objects (e.g., ComboBox, ListBox) and Dat…
    Viewers will learn the basics of slicers and timelines for both PivotTables and standard Excel tables in Excel 2013.
    This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now