Returns the error code from the connection when the icError (11) state occurs in the StateChanged event. For a description of the error, check the ResponseInfo property.
Syntax
object.ResponseCode= code
The ResponseCode property syntax has these parts:
Part | Description |
object | An object expression that evaluates to an object in the Applies To list. |
code | The number returned by the remote server. |
Data Type
Long
Remarks
Use the StateChanged event to receive notification of an error, as shown below:
Private Sub Inet1_StateChanged(ByVal State As Integer)
Dim strMess As String ' Message variable.
Select Case State
' ... Other cases not shown.
Case icError ' 11
' Get the Text of the error.
strMess = "ErrorCode: " & Inet1.ResponseCode & _
" : " & Inet1.ResponseInfo
End Select
Debug.Print strMess
End Sub