Connected Property

Public Property Connected As Boolean

Summary

This is a read-only property that indicates whether the Connect Method has been successfully called on this object and that the Disconnect Method has not been called since then. Reading this property does not cause any communication with the device nor does it verify that the connection to the device is still good. For that, see the VerifyConnection Method.

If there is a connection to the device, this property will read as true. If there is not a connection to the device, rather than raising an error, this property will simply read false.

Parameters

This property does not have any parameters.

Value

This property is a boolean type. A true value means that the object is connected to an ETH32 device, while false means that it is not.

Example
Private Sub example()
    
    ' Set up error handling for this routine
    On Error GoTo myerror
    
    
    ' .... Your code here

    ' Assume that we don't know for sure whether the dev object
    ' is connected to a device, but that if it is, we want to
    ' disconnect it.  This code accomplishes that:
    If dev.Connected Then
        dev.Disconnect
    End If
    
    Exit Sub
myerror:
    MsgBox "ETH32 error: " & dev.ErrorString(Err.Number)
End Sub
       
See Also

Connect Method, Disconnect Method, VerifyConnection Method