ErrObject.Description プロパティ

定義

エラーに関連する説明文字列を含む String 型の式を返すか、または設定します。 読み取りと書き込みが可能です。

public:
 property System::String ^ Description { System::String ^ get(); void set(System::String ^ value); };
public string Description { get; set; }
member this.Description : string with get, set
Public Property Description As String

プロパティ値

エラーに関連する説明文字列を含む String 型の式を返すか、または設定します。 読み取りと書き込みが可能です。

次の使用例は、 オブジェクトの プロパティに Description ユーザー定義メッセージを Err 割り当てます。

On Error Resume Next
Err.Raise(60000)
Err.Description = "Your Widget needs a new Frob!"
MsgBox(Err.Description)

注釈

プロパティの設定は Description 、エラーの簡単な説明で構成されます。 このプロパティを使用して、処理できない、または処理したくないエラーをユーザーに警告します。 ユーザー定義エラーを生成する場合は、エラーの簡単な説明を プロパティに Description 割り当てます。 プロパティが Description 入力されておらず、 プロパティの Number 値が Visual Basic の実行時エラーに対応する場合、エラーが生成されるときに、関数によって ErrorToString 返される文字列が プロパティに Description 設定されます。

適用対象

こちらもご覧ください