By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,986 Members | 1,522 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,986 IT Pros & Developers. It's quick & easy.

reading specific text lines

P: 2
I have been googling this for hours and the results were not helpful in my situation.

I am using VB6. I just want to read line 3 of a text file and use it as input. if some1 could tell me how to do this I would GREATLY appreciate it.

thanks in advance.
Nov 29 '06 #1
Share this Question
Share on Google+
3 Replies


P: 2
also if anyone can tell me how to read from a certain word or a few text characters to another word or set of text characters that would be great if not better. thanks
Nov 29 '06 #2

Expert 5K+
P: 8,434
I have been googling this for hours and the results were not helpful in my situation.

I am using VB6. I just want to read line 3 of a text file and use it as input. if some1 could tell me how to do this I would GREATLY appreciate it.

thanks in advance.
Here's a real quickie...
Expand|Select|Wrap|Line Numbers
  1. OPEN "FILE.TXT" FOR INPUT ACCESS READ SHARED AS #1
  2. LINE INPUT #1, Var1
  3. LINE INPUT #1, Var2
  4. LINE INPUT #1, Var3
  5. CLOSE #1
Nov 29 '06 #3

Expert 5K+
P: 8,434
also if anyone can tell me how to read from a certain word or a few text characters to another word or set of text characters that would be great if not better. thanks
Not sure what you mean here, but you might try looking into binary mode file access. There are other ways, too - for example try searching on FileSystemObject, and TextStream.
Nov 29 '06 #4

Post your reply

Sign in to post your reply or Sign up for a free account.