Share via

Turn off error checking on a sheet

Anonymous
2013-10-16T21:01:45+00:00

Hi

I have a report within a sheet. It works / looks fine on my PC.

However when I send the spreadsheet to others and they open it the sheet displays lots of error checking symbols in each cell

Is there a way that I can setup a sheet to turn off error checking when another user opens it - i guess i want it to be specific to my spreadsheet rather that the users setting for all their sheets?

Thanks

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

HansV 462.6K Reputation points
2013-10-17T05:54:51+00:00

The code will turn off error checking when your workbook is opened or activated, and restore the original settings, whatever they were, when your workbook is closed or deactivated (i.e. the user switches to another workbook).

Was this answer helpful?

0 comments No comments

3 additional answers

Sort by: Most helpful
  1. HansV 462.6K Reputation points
    2013-10-16T21:44:44+00:00

    The error-checking options are user-level and application-wide settings (in the Formulas tab of File > Options). Even if you turn them off, that doesn't affect what other users see.

    You could run code to do what you want, but that would require users to allow macros, which might be problematic.

    In the ThisWorkbook module:

    Private blnBackgroundChecking As Boolean

    Private blnEmptyCellReferences As Boolean

    Private blnEvaluateToError As Boolean

    Private blnInconsistentFormula As Boolean

    Private blnInconsistentTableFormula As Boolean

    Private blnListDataValidation As Boolean

    Private blnNumberAsText As Boolean

    Private blnOmittedCells As Boolean

    Private blnTextDate As Boolean

    Private blnUnlockedFormulaCells As Boolean

    Private Sub Workbook_Activate()

        CheckingOff

    End Sub

    Private Sub Workbook_BeforeClose(Cancel As Boolean)

        RestoreChecking

    End Sub

    Private Sub Workbook_Deactivate()

        RestoreChecking

    End Sub

    Private Sub Workbook_Open()

        CheckingOff

    End Sub

    Private Sub CheckingOff()

        With Application.ErrorCheckingOptions

            blnBackgroundChecking = .BackgroundChecking

            blnEmptyCellReferences = .EmptyCellReferences

            blnEvaluateToError = .EvaluateToError

            blnInconsistentFormula = .InconsistentFormula

            blnInconsistentTableFormula = .InconsistentTableFormula

            blnListDataValidation = .ListDataValidation

            blnNumberAsText = .NumberAsText

            blnOmittedCells = .OmittedCells

            blnTextDate = .TextDate

            blnUnlockedFormulaCells = .UnlockedFormulaCells

            .BackgroundChecking = False

            .EmptyCellReferences = False

            .EvaluateToError = False

            .InconsistentFormula = False

            .InconsistentTableFormula = False

            .IndicatorColorIndex = False

            .ListDataValidation = False

            .NumberAsText = False

            .OmittedCells = False

            .TextDate = False

            .UnlockedFormulaCells = False

        End With

    End Sub

    Private Sub RestoreChecking()

        With Application.ErrorCheckingOptions

            .BackgroundChecking = blnBackgroundChecking

            .EmptyCellReferences = blnEmptyCellReferences

            .EvaluateToError = blnEvaluateToError

            .InconsistentFormula = blnInconsistentFormula

            .InconsistentTableFormula = blnInconsistentTableFormula

            .ListDataValidation = blnListDataValidation

            .NumberAsText = blnNumberAsText

            .OmittedCells = blnOmittedCells

            .TextDate = blnTextDate

            .UnlockedFormulaCells = blnUnlockedFormulaCells

        End With

    End Sub

    Edited by HansV MVP to remove incorrect lines.

    Was this answer helpful?

    2 people found this answer helpful.
    0 comments No comments
  2. Anonymous
    2013-10-18T02:53:43+00:00

    Thanks very much

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2013-10-17T00:08:49+00:00

    Thanks

    Will this work if the user had already disabled error checking eg would this only impact this workbook or would it potentially affect their settings ?

    Was this answer helpful?

    0 comments No comments