Pro VB 6For advanced Visual Basic coders working in version 6 (not .NET). Beginning-level questions will be redirected to other forums, including Beginning VB 6.
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Pro VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Dim FileNumber As Integer
Dim MyString As String
FileNumber = FreeFile
Open "c:\test.txt" For Input As #FileNumber
Do Until EOF(FileNumber)
i = 1
Line Input #FileNumber, MyString
'One line of data now contained in
'MyString variable. Process as necessary.
Debug.Print MyString
For z = 1 To Len(MyString)
Loop
Now Use InStr and Mid function to extract your string.