ErrorCheckingOptions.EvaluateToError Property (Excel)

Office 2013 and later
GitHub-Mark-64px

Contribute to this content

Use GitHub to suggest and submit changes. See our guidelines for contributing to VBA documentation.

When set to True (default), Microsoft Excel identifies, with an AutoCorrect Options button, selected cells that contain formulas evaluating to an error. False disables error checking for cells that evaluate to an error value. Read/write Boolean.

expression .EvaluateToError

expression A variable that represents an ErrorCheckingOptions object.

In the following example, the AutoCorrect Options button appears for cell A3, which contains a divide-by-zero error.

Sub CheckEvaluationError() 
 
 ' Simulate a divide-by-zero error. 
 Application.ErrorCheckingOptions.EvaluateToError = True 
 Range("A1").Value = 1 
 Range("A2").Value = 0 
 Range("A3").Formula = "=A1/A2" 
 
End Sub
Show: