Share via


ErrorCheckingOptions.NumberAsText Property

Excel Developer Reference

When set to True (default), Microsoft Excel identifies, with an AutoCorrect Options button, selected cells that contain numbers written as text. False disables error checking for numbers written as text. Read/write Boolean.

Syntax

expression.NumberAsText

expression   A variable that represents an ErrorCheckingOptions object.

Example

In the following example, the AutoCorrect Options button appears for cell A1, which contains a number stored as text.

Visual Basic for Applications
  Sub CheckNumberAsText()
' Simulate an error by referencing a number stored as text.
Application.ErrorCheckingOptions.<strong class="bterm">NumberAsText</strong> = True
Range("A1").Value = "'1"

End Sub

See Also