ErrorCheckingOptions.TextDate Property

Excel Developer Reference

When set to True (default), Microsoft Excel identifies, with an AutoCorrect Options button, cells that contain a text date with a two-digit year. False disables error checking for cells containing a text date with a two-digit year. Read/write Boolean.

Syntax

expression.TextDate

expression   A variable that represents an ErrorCheckingOptions object.

Example

In the following example, the AutoCorrect Options button appears for cell A1, which contains a text date with a two-digit year.

Visual Basic for Applications
  Sub CheckTextDate()
' Simulate an error by referencing a text date with a two-digit year.
Application.ErrorCheckingOptions.<strong class="bterm">TextDate</strong> = True
Range("A1").Formula = "'April 23, 00"

End Sub

See Also