CommPort

This property sets and returns the communications port number.

Syntax

object.CommPort [ = value]

Parameters

object
Object expression that evaluates to a Comm control.
value
Integer value that specifies the port number.

Remarks

You must set the CommPort property before opening the port.

You can set this value to any number from 1 through 16 at design time. The default is 1. However, if the port does not exist or is in use by another application when you attempt to open it with the PortOpen property, the Comm control generates error 8005 (device unavailable).