[Resolved] VB6 with Uno serialprint to text box

Paul,

Thanks for reading and once again for the lessons sofar.

Now I reread again I had a typo and an explanation ommision in that last 2 code lines.

       lngPos = InStr(strBuffer, vbCrLf) 'catch position number of first CRLF in the buffer
               If lngPos > 0 Then newString = Left$(strBuffer, lngPos - 1) 'If the position is larger then 0 remove all rigth fromt the CRLF
               lngPos2 = InStr(newString, ",") 'catch position number of the comma in the string
               lngLen = Len(newString) 'measure length of string
               If lngPos2 > 0 Then strValue = Right$(newString, (lngLen - 2)) 'remove the letter and the "," from the string
               strCase = Left$(newString, 1) 'leave the data only in this string

Ran into an other issue for which I am looking for simple if statement trapping for the first few loops the buffer is filled.
As the value in strCase now sometimes are not only byte values (from 0 to 255) but like "A,0B1" for the first loops I like to make a
if statement that checks if ther are only byte values in strValue otherwise skip.
something like this:

If ((strValue <0) and (>255)) Then
               strValue = vbNullString
               Else
            'RUN code
end if

But the check for 0 to 255 should be in BYTE mode?

Paco