Errors._Default[Object] Property

Definition

Allows the user to to access error checking options.

public:
 property Microsoft::Office::Interop::Excel::Error ^ default[System::Object ^] { Microsoft::Office::Interop::Excel::Error ^ get(System::Object ^ Index); };
public Microsoft.Office.Interop.Excel.Error this[object Index] { get; }
Default Public ReadOnly Property _Default(Index As Object) As Error

Parameters

Index
Object

Property Value

Examples

In this example, a number written as text is placed in cell A1. Microsoft Excel then determines if the number is written as text in cell A1 and notifies the user accordingly.

<span class="label">Sub CheckForErrors()































































































































































































































































































































































































































































































































    Range("A1").Formula = "'12"































































































































































































































































































































































































































































































































    If Range("A1").</span>
<i>Errors</i>
<span class="label">.Item(xlNumberAsText).Value = True Then        MsgBox "The number is written as text."    Else        MsgBox "The number is not written as text."    End IfEnd Sub</span>

Remarks

Reference the Errors object to view a list of index values associated with error checking options.

Applies to