-1

On Windows 11, I cannot access serial port with macro-based Excel to send a command to the serial port. But the same Excel is working fine on Windows 10. Please suggest a solution.

Example: the command shown here is unable to open the serial port for communication in VBA:

Open "COM" & port & ":19200,N,8,1" For Binary Access Read Write As #1   'Opens Com Port with Baud rate and bit settings

The above command is working fine on Windows 10 - I am expecting same thing with Windows 11.

1
  • 2
    What error message do you get? Does the Win 11 machine even have a serial port? What version(s) of Excel are running on each platform? Commented Apr 18 at 12:55

1 Answer 1

1

So if it is the case of VBA Excel not opening port, the fix i got is to only use "COM1" and not with the extra bitrate and and and..

Open "COM4:115200,N,8,1" For Binary Access Read Write As #1

Open "COM4" For Binary Access Read Write As #1
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.