Arduino LM335 and visual basic 6

This works for me. You should be able to modify it to get what you want.

Function TempNow() As Single
Dim str As String
Dim strt, fin, ct As Integer
Dim tempstr As String
Dim u As Single
Dim i, B  As Integer
u = 0
str = ""
For i = 1 To 5
Sleep 10
 str = MSComm1.Input
' I use "Tmp and "@" instead of "<" and ">"
 If InStr(str, "Tmp") > 0 And InStr(str, "@") > 0 Then
   GoTo J1
 End If
Next i

J1:
ct = 0
u = 0
 
  strt = InStr(str, "@-") + 2
  fin = InStr(str, "-Tmp")
  If (fin - strt) <= 0 Then
   Exit Function
  Else
   ct = ct + 1
   u = u + Mid(str, strt, (fin - strt))
 End If
 TempNow = u / ct
 If Option1.Value = True Then
    TempNow = TempNow * (9 / 5) + 32
 End If
End Function