reading specific text lines

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • firstmilkman
    New Member
    • Nov 2006
    • 2

    #1

    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.
  • firstmilkman
    New Member
    • Nov 2006
    • 2

    #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

    Comment

    • Killer42
      Recognized Expert Expert
      • Oct 2006
      • 8429

      #3
      Originally posted by firstmilkman
      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...
      Code:
      OPEN "FILE.TXT" FOR INPUT ACCESS READ SHARED AS #1
      LINE INPUT #1, Var1
      LINE INPUT #1, Var2
      LINE INPUT #1, Var3
      CLOSE #1

      Comment

      • Killer42
        Recognized Expert Expert
        • Oct 2006
        • 8429

        #4
        Originally posted by firstmilkman
        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 FileSystemObjec t, and TextStream.

        Comment

        Working...