What's the best way to read a text file line by line?
line input is fine for reading the data but how to do you
continue to the next line and stop at the end
Printable View
What's the best way to read a text file line by line?
line input is fine for reading the data but how to do you
continue to the next line and stop at the end
thats it!Code:Open "Filename" for Input as #1
Do While Not EOF (1) '1 is the file number (open...for..as #1)
LineInput #1,strVariable
'Do your stuff here for each line
loop
Close #1
Hope this helps
I know it's just a typo, but it case somebody gets stuck:
Code:LineInput #1
should be
Line Input #1
JOP! you think your Sooooo Smart catching other peoples mistakes! Well let me tell YOU somethin.....
Thanks
:D
Good catch...
Thx for the help
I figured it out a few seconds after i posted it.
I thought u had to treat it like a DB and move to the next
line manually. Guess not, it's simple for once :)
thanks fellas
hehe :DQuote:
JOP! you think your Sooooo Smart catching other peoples mistakes! Well let me tell YOU somethin.....
Thanks
Good catch...
at least your not that type a guy that starts whining when I correct somebody :) I've seen that lots of times happening here.
Have a nice day :D