PortOpen
Sets or Retrieves the state of the communications port (Open or Closed).
Only available at Runtime.
MSComm32 and Comm32 have Identical behavior.
 |
| |
Syntax |
object.PortOpen = value |
| |
|
|
| |
object |
Name of the communications control. |
| |
value |
A boolean expression indicating the state of the port. |
| |
|
|
| |
Example |
object.PortOpen = True |
'// Set the value (Open the port) |
| |
|
|
|
| |
|
If object.PortOpen = True then
MsgBox("Port is Open")
Else
MsgBox("Port is Closed")
End if |
'//Retrieve the current state of the port |
| |
|
|
|
|
 |
Remarks:
If you attempt to open a port that does not exist or when it is already open a trapable runtime error will occur.
|