I'm using the s.autECLPS.GetText command to grab text out of the Terminal program.

Once I grab data from that, I put it into a variable. I want to check that variable against A1, A2, A3, A4, etc., to see if that value already exists in the sheet I have.

My problem comes from the fact that the text that I grab can vary in lengths - sometimes it's 5 digits, sometimes it's 20, so I've had to build the s.autECLPS.GetText to grab the max length each time - so on SHORTER items, the end result may include 5 digits, and 15 blank spaces, like this:

Example 1: ASDF1234_________________
Example 2: ASDFJSODAFJ2394827349293JS

Prior to this function running, I have another piece of code that runs "text to columns" on column A and delete multiple blanks, so all of my data in column A has NO additional spaces at the end.

This was working fine until I tried to do this last part. I cannot compare the data taken into the variable via s.autECLPS.GetText with the data in a cell, because the additional spaces make them always not equal.


dCheck = s.autECLPS.GetText(1, 8, 3)  'This grabs the first 3 digits of the selection in Terminal and puts it into the variable dCheck

The cell I am comparing it to is held in:
Cells(tRow, 1).Offset(ttRow, 0).Value
How do I say:

If dCheck = the first the characters in Cells(tRow, 1).Offset(ttRow, 0).Value then

Thanks!