How to get byte position? [Resolved]
Hi, everyone!
I'm newbie of course
Here is my problem.I want to search some text in binary file (created by me).So far, so good. But when I try to get byte position for searched string - nothings happen.Here is my code:
Dim strFile As String
Dim bytPos As Byte
Dim lngTelPos As Long
Open "example.ran" For Binary Access Read Lock Read Write As #1
strFile = Input(LOF(1), #1)
bytPos = InStr(1, strFile, strName)
lngTelPos = Loc(1)
If bytPos > 0 Then
Get #1, lngTelPos + 1, strTel
a = MsgBox(...)
Else
a = MsgBox(...)
End If
Close #1