reading data from com port into 2 different cell locations.

N

Neil K

Here is part of my code to read in data from the com port and send the same
data to 2 different cell locations. I'm wondering when I send the data to
the first cell, is there any data left for cell H5 that I'm sending it to?
The selected row increments each time, cell H5 stays the same every time.
I'm also open to any suggestions to shorten up this code.




'Val2 ID Number
UserForm1.MSComm1.InputLen = 4 '# of char
to read in from com port.
RB = UserForm1.MSComm1.input 'Sets
input on com port to variable RB.
Excel.Range("C" & Excel.Selection.Row).Select 'Select cell
c in selected row.
Excel.Selection = RB
'Send data to cell c in selected row.
Cells (H5) = RB
'Send data to cell (location is the same always)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top