read a line from a text file

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • hermitking
    New Member
    • Nov 2007
    • 30

    read a line from a text file

    i need to read line 2 of a text file but not line 1
    here is what i tryed
    [CODE=vbnet]Dim MyTime = Format(Now, "dd-MMM-yyyy")
    Dim phillstatus As String
    Dim phillcount As String
    Dim phillreader As String
    phillreader = My.Computer.Fil eSystem.ReadAll Text("C:\Users\ Richard\Documen ts\test.txt")
    phillcount = phillreader.Rea dLine(1)[/CODE]
    Last edited by Killer42; Dec 13 '07, 02:08 AM.
  • Killer42
    Recognized Expert Expert
    • Oct 2006
    • 8429

    #2
    Originally posted by hermitking
    ...here is what i tryed...
    Dyd it work?

    Comment

    • hermitking
      New Member
      • Nov 2007
      • 30

      #3
      Originally posted by Killer42
      Dyd it work?
      no so i change the code to

      phillreader = My.Computer.Fil eSystem.ReadAll Text("H:\VB\phi ll count.txt")
      phillcount = phillreader(1)
      TextBox1.Text = phillcount

      this and it will only read that chatcher number

      Comment

      • Killer42
        Recognized Expert Expert
        • Oct 2006
        • 8429

        #4
        Two questions...
        1. Is there any difference, apart from the fact that you're putting the output in a textbox?
        2. What does the word "chatcher" mean?

        Comment

        • hermitking
          New Member
          • Nov 2007
          • 30

          #5
          what ever nuber i put i get that letter of the file

          Comment

          • hermitking
            New Member
            • Nov 2007
            • 30

            #6
            i need the hole lin in 2 seperate things

            Comment

            • debasisdas
              Recognized Expert Expert
              • Dec 2006
              • 8119

              #7
              What are "nuber" , "hole" , "lin"

              This is not a chatting forum . Please post your questions clearly.

              Comment

              Working...