 |
|
|
Topic: Invalid port number
|
By: Chris | Posted on: Jul 15 2021 at 06:58:45 AM | I am running VBA in Access
When I click on a button and execute the following simple code I just get Run-time error 8002 Invalid port number.
SComm1.CommPort = 1
SComm1.Settings = "9600,n,8,1"
SComm1.PortOpen = True
SComm1.Output = "Hello World"
I expected to see "Hello World" appear on Tera Term. | |
By: Support | Posted on: Jul 29 2021 at 04:15:54 AM | Run the code in the IDE and single step. I assume you're getting the runtime error at .PortOpen
Are you sure your port is Com1?
Look in Windows Device Manager. This lists all device in your computer. There should be a group named "Ports Com&LPT". Do you see that? Inside there you should have the available com port numbers. Do you have a Com1 ? (or some other Com number) | |
|