i/ never hurts to check first that the string is actually a number, eg:
If IsNumber(SomeString) Then
Dim Number As Long = SomeString
Else
Log("Number? That's not a number...")
Dim Number As Long = 999999999999999999 'that's a number ;-)
End If
or:
Try
Dim Number As Long = SomeString
Catch
Log("Nice try, no cigar")
End Try
ii/ is the string readable text, or is it a packet of data of raw bytes ie in binary format?
edit: sadly, the hyperlink on the
that's a number comment got lost in the code block.