[Resolved] VB6 with Uno serialprint to text box

               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

You never modify newString to remove the comma and the stuff that follows it, so newString will still contain something like "A,24" which is not 'A'.

The code in the next post DOES create a new variable that is the stuff before the comma, so a switch/case would work.