Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

from com port to xl cell

Status
Not open for further replies.

BobCrawf

MIS
Jun 19, 1999
75
US
I need to send a &quot;D&quot; out to a device via com1 to cause it to send a string back to the pc via com1.<br><br>I then need to store the data received on com1 in a cell on a worksheet.<br><br>I can't seem to find any way to send or receive data to or from a com port from Excel using VBA.<br><br>The Basic code to do what I want is:<br><br>10 OPEN &quot;COM1 :600,N,7,2,RS,CS,DS,CD&quot; AS #2<br>20 A$=&quot;D&quot;<br>30 PRINT #2,A$<br>40 IN$=INPUT$(14,#2)<br>50 PRINT IN$<br>60 CLOSE #2<br>70 END<br><br>If anyone has any idea how to do this in VBA I would be forever grateful.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top