BackgroundChecking Property

Microsoft Excel Visual Basic

expression.BackgroundChecking

expression    Required. An expression that returns one of the objects in the Applies To list.

Remarks

Refer to the ErrorCheckingOptions object to view a list of its members that can be enabled.

Example

In the following example, when the user selects cell A1 (which contains a formula referring to empty cells), the AutoCorrect Options button appears.

Sub CheckBackground()

    ' Simulate an error by referring to empty cells.
    Application.ErrorCheckingOptions.BackgroundChecking = True
    Range("A1").Select
    ActiveCell.Formula = "=A2/A3"

End Sub