467,161 Members | 879 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,161 developers. It's quick & easy.

reading specific text lines

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
  • viewed: 1113
Share:
3 Replies
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 8TB
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 8TB
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.

Similar topics

14 posts views Thread by Job Lot | last post: by
7 posts views Thread by jamait | last post: by
18 posts views Thread by Michael | last post: by
21 posts views Thread by JoKur | last post: by
12 posts views Thread by Yi Xing | last post: by
3 posts views Thread by lizii | last post: by
3 posts views Thread by The Cool Giraffe | last post: by
7 posts views Thread by =?Utf-8?B?QnJpYW4gQ29vaw==?= | last post: by
21 posts views Thread by Stephen.Schoenberger@gmail.com | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.