Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

need to move back to BOF in a text file

Status
Not open for further replies.

DougP

MIS
Joined
Dec 13, 1999
Messages
5,985
Location
US
I need to open a text file and find words. Then I want to return to the Beginning of the file and search again. How do I code this?
Code:
    Open "C:\BambooVBSource\code.txt" For Input As #1
        Do While Not EOF(1)
            
        line input #1, a
        Loop
‘ move back to Beginning of the file

TIA

DougP, MCP, A+
 
Just close the file after the first loop then re-open it.

[gray]Experience is something you don't get until just after you need it.[/gray]
 
Ok

DougP, MCP, A+
 
strongm, I can't remember when I last used Seek. You obviously have a better memory than I. [pipe]

Alan

[gray]Experience is something you don't get until just after you need it.[/gray]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top