View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
thanks thanks is offline
external usenet poster
 
Posts: 48
Default 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.