<< Prev        Next >>

ID : 111

Err.Description

Function

This property contains an error message.

Syntax

Err.Description

Return value

An error message is returned. An error message is string type data.

Description

The latest error message is stored.

This command can read value but cannot write.

Attention

Value varies depending on language setting.

Example

'!TITLE "Display Error Message"
' Display the error message of a stored error object on the message output window
Sub Sample_ErrDescription

  On Error GoTo LABEL1

  Dim aaa As Integer

  Dim bbb As Integer

  aaa = 100

  bbb = 0

  ' Error occurs during zero divide
  aaa = aaa / bbb

  Exit Sub

LABEL1:

  ' Display error message on the message output window
  PrintDbg Err.Description

End Sub

ID : 111

<< Prev        Next >>