Errors._Default[Object] プロパティ

定義

エラー チェックの各オプションの状態を取得することができます。

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

パラメーター

Index
Object

プロパティ値

次の使用例では、セル A1 に数値を文字列として設定します。 その数値が文字列として記述されているかどうか判別し、その結果に応じて、メッセージを表示します。

<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>

注釈

オブジェクトを Errors 参照して、エラー チェック オプションに関連付けられているインデックス値の一覧を表示します。

適用対象