Computing.Net > Forums > Programming > End of file in VB 6

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

End of file in VB 6

Reply to Message Icon

Name: bzb
Date: February 18, 2003 at 12:17:35 Pacific
OS: Win 2000 Pro
CPU/Ram: AMD950 - 256K
Comment:

Hello,

My question:

Using Textstream Object reading an ASCII file with ReadLine method, how do you tell if you are at end of file??

Thanks for any help...



Sponsored Link
Ads by Google

Response Number 1
Name: Alex C. Barberi
Date: February 18, 2003 at 17:04:18 Pacific
Reply:

Here is the code:

Dim sText As String

Do Until EOF
sText = ReadLine
Loop

The spot that says ReadLine is where you put your read line code, and this should work.


0

Response Number 2
Name: borelli34
Date: February 18, 2003 at 19:58:49 Pacific
Reply:

just to elaborate: enclose the open file number within parens with the eof function (EOF(#1)).

borelli34


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


C++ (Do-While Loops) Log keystrokes



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: End of file in VB 6

Flash File in VB www.computing.net/answers/programming/flash-file-in-vb/5527.html

Flash File in VB www.computing.net/answers/programming/flash-file-in-vb/5496.html

How to remove end-of-line in a file www.computing.net/answers/programming/how-to-remove-endofline-in-a-file/10873.html