ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Passing HEX or ASCII to a com port (https://www.excelbanter.com/excel-programming/432970-passing-hex-ascii-com-port.html)

thanks

Passing HEX or ASCII to a com port
 
Hello
I want to create a button in Excel that when I click it, it will send either
and ASCII or HEX command to a COM port to control the on/off function of a
receiving device. So Im thinking the if I put my HEX in cell A1, then the
macro would open the com port, grab whatever is in cell A1 and pass it
through the com port. It will probably need to close the port after the
command has been sent too. I wouldnt mind being able to get a read back
status, but my first thing is to be able to send the command code. I saw a
few forums where someone gave a similar example, but they kept referring to
MSComm through VB. I have not been able to understand how to apply MSComm
after downloading it.

Patrick Molloy[_2_]

Passing HEX or ASCII to a com port
 
try this link:

http://www.yes-tele.com/mscomm.html


"Thanks" wrote:

Hello
I want to create a button in Excel that when I click it, it will send either
and ASCII or HEX command to a COM port to control the on/off function of a
receiving device. So Im thinking the if I put my HEX in cell A1, then the
macro would open the com port, grab whatever is in cell A1 and pass it
through the com port. It will probably need to close the port after the
command has been sent too. I wouldnt mind being able to get a read back
status, but my first thing is to be able to send the command code. I saw a
few forums where someone gave a similar example, but they kept referring to
MSComm through VB. I have not been able to understand how to apply MSComm
after downloading it.



All times are GMT +1. The time now is 11:52 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com