Please Help!!!
Can anybody tell me how i can open a text file and read it "Line by Line"?
Here is my Visual Basic 6 example.... :
Open "C:Test.txt" For Input As #1
Do While Not Eof(1)
Line Input #1, N$
Msgbox N$
Loop
Close
Many thanks in advance!!!
Opening and reading a text file line by line
Opening and reading a text file line by line
You can use FileStream, something like this:
dim filenaam as string
dim f as FileStream
dim line as string
filenaam = "myfile.txt"
if FileExists(filename)=true then
f.Open(filename)
while f.Position < f.Size
line=f.ReadLine
showmessage line
wend
f.Close
end if
dim filenaam as string
dim f as FileStream
dim line as string
filenaam = "myfile.txt"
if FileExists(filename)=true then
f.Open(filename)
while f.Position < f.Size
line=f.ReadLine
showmessage line
wend
f.Close
end if