Read/write a Serial Port
Thanks MP, but I don't understand what you mean.
Could you please explain a bit more simply or tell me
where I could read up on how to do this. I can't find any
help in VBA about the functions you suggest.
If it can't be done directly in VAB do I need to write and
run code outside Excel's VBA?
I have read serial port data on an Apple II computer many
years ago so I know a tiny bit, but I don't where to start
with VBA for use in or with Excel.
-----Original Message-----
Hi Wal,
Not directly but you can use API functions:
API Function: Description:
CreateFile() opens a specific communications
port.
SetCommState() sets the state of the serial port in
question (baud rate,
parity, stop bits etc.)
GetCommState() retrieves the state of the serial port
in question (baud
rate, parity, stop bits etc.)
ReadFile() reads data from a port. Can be
specified to return
immediately or wait for incoming data.
WriteFile() writes data to the serial port.
MP
"Wal" a écrit dans
le message de
...
Is it possible to use VBA read and write to a serial
port
for use in/from Excel?
Where can I look at sample code to learn how it is done?
.
|