Arduino LM335 and visual basic 6

i wonder if the code below is written for vb6 or some newer versions
The command " SLEEP 10" shows " Sub or function not defined"
i am running vb6 and all i get is 0
the string is ex "TMP22.15@"

in timer1 i have
call TempNow
label5.caption=TempNow

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