ErrorStatus Property Example

This example uses the Screen object's OIA property to reference the OIA object. The OIA object is then used to return session errors (ErrorStatus property).

Sub Main

 Dim Sys As Object

 Dim Sess As Object

 Dim MyScreen As Object

' This gets the System object

 Set Sys = CreateObject("EXTRA.System")

' Assumes an open session

 Set Sess = Sys.ActiveSession

 Set MyScreen = Sess.Screen

' The following If statement displays status messages pertaining to

' host/client communication.

 If MyScreen.OIA.ErrorStatus = 1 Then

  MsgBox "A configuration mismatch has occurred."

 ElseIf MyScreen.OIA.ErrorStatus = 2 Then

  MsgBox "A communications hardware problem has occurred."

 ElseIf MyScreen.OIA.ErrorStatus = 3 Then

  MsgBox "A physical connection problem has occurred."

 End If

End Sub