Arduino LM335 and visual basic 6

if the second sensor shows a value less then 10 or more than 100 the strings get confused.

on which end the VB or Arduino?

i beleive it is the threshold for mscomm1

The com port only sees characters coming through.You need to use the string functions to find the start and end of the value you are looking for. Then if it is a 10 or a 1000 will make no difference.

so if your input string is a10b or a1000b it makes no difference to the code below

 strt = InStr(str, "a") +1  ' one char past the a 
  fin = InStr(str, "b")
  If (fin - strt) <= 0 Then
   Exit Function
  Else
   SensorVal =  Mid(str, strt, (fin - strt))