Sets and returns the communications port number.
Syntax
object.CommPort[ = value ]
The CommPort property syntax has these parts:
Part | Description |
object | An object expression that evaluates to an object in the Applies To list. |
value | A integer value specifying the port number. |
Remarks
You can set value to any number between 1 and 16 at design time (the default is 1). However, the MSComm control generates error 68 (Device unavailable
) if the port does not exist when you attempt to open it with the PortOpen property.
Warning You must set the CommPort property before opening the port.
Data Type
Integer