Skip to content

Serialcomms/Serial-Ports-in-VBA-Extra-Simple-2022

Repository files navigation

Serial Ports in VBA for 2022

Minimal version for basic send and receive data use only

This is the further simplified set of VBA Serial Port functions for use with one pre-defined Com Port only.

Intended for use with serial devices which have a well-defined set of short commands and responses.

Functions can be used directly as formulas in Excel Worksheet Cells.

Assumes that COM Port has previously been configured correctly via command-line or other method

No functionality provided for

  • Debugging

  • Multiple COM Ports

  • Waiting data check before read 1

  • Device hardware (signalling) functions

  • COM Port settings to be modified on starting

4 functions only - start, stop, send, read com port

Footnotes

  1. Read and Write in same Excel document may require read delay.
    Uncomment kernel_sleep_milliseconds in function read_com_port
    Suggested values = 50 to 500 depending on baud rate, message length.