ErrorCheckingOptions Object [Excel 2003 VBA Language Reference]
Application ErrorCheckingOptions |
Represents the error-checking options for an application.
Using the ErrorCheckingOptions Object
Use the ErrorCheckingOptions property of the Application object to return an ErrorCheckingOptions object.
Reference the Item property of the Errors object to view a list of index values associated with error-checking options.
Once an ErrorCheckingOptions object is returned, you can use the following properties, which are members of the ErrorCheckingOptions object, to set or return error checking options.
- BackgroundChecking
- EmptyCellReferences
- EvaluateToError
- InconsistentFormula
- IndicatorColorIndex
- NumberAsText
- OmittedCells
- TextDate
- UnlockedFormulaCells
The following example uses the TextDate property to enable error checking for two-digit-year text dates and notifies the user.
Sub CheckTextDates()
Dim rngFormula As Range
Set rngFormula = Application.Range("A1")
Range("A1").Formula = "'April 23, 00"
Application.ErrorCheckingOptions.TextDate = True
' Perform check to see if 2 digit year TextDate check is on.
If rngFormula.Errors.Item(xlTextDate).Value = True Then
MsgBox "The text date error checking feature is enabled."
Else
MsgBox "The text date error checking feature is not on."
End If
End Sub
Properties | Application Property | BackgroundChecking Property | Creator Property | EmptyCellReferences Property | EvaluateToError Property | InconsistentFormula Property | IndicatorColorIndex Property | ListDataValidation Property | NumberAsText Property | OmittedCells Property | Parent Property | TextDate Property | UnlockedFormulaCells Property
Parent Objects | Application Object
Child Objects
See Also | Error Object | ErrorBars Object