Dim WspX() As Double
-----------
If Buffer.Length=5 Then
If Odebrane.StartsWith(Chr(104)) Then
If Odebrane.EndsWith(Chr(13)) Then
Try
k=k+1
Suwak2=Odebrane.SubString2(1,4)
Val3 = NumberFormat(Suwak2,3,0)
Val4 = Val3/250 'it's double
For i=0 To k
WspX(i)=Val4
Next
Log(WspX(i))
Xmin = Activity.Width/2
Catch
Log(LastException.Message)
End Try
End If
End If