Sets and returns the communications port number. You can set this value to any number between 1 and 16 at design time (the default is 1). However, the Comm control generates error 68 (Device unavailable)
if the port does not exist when you attempt to open it with the PortOpen property.
Sets and returns the communications port number.
object.CommPort[ = value ]
The parts of the CommPort property syntax are described in the following table.
Part | Description |
---|---|
object | An object expression that evaluates to an object. |
value | A integer value specifying the port number. |
You can set value to any number between 1 and 16 at design time (the default is 1). However, the Comm control generates error 68 (Device unavailable
) if the port does not exist when you attempt to open it with the PortOpen property.
Note You must set the CommPort property before opening the port.
Integer