![]() |
reading data from com port into 2 different cell locations.
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) |
All times are GMT +1. The time now is 05:52 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com