Inputing a specific line from a text file into a variable

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • frankleggett
    New Member
    • Oct 2006
    • 22

    #1

    Inputing a specific line from a text file into a variable

    Hi

    Excuse my ignorance but I am trying to write a very simple program. It needs to be simple because of my lack of knowledge. Anyway I would like to input a specific line from a textfile without having to load all the previous lines first into unused variables before I get to the line I want. For example this is a copy of one of my text files

    1
    10
    A Name

    This textfile has 3 usable lines of information and I require only the second line. At the moment I am having to do something like this.

    Input #1, Unused Variable 1
    Input #1, Unused Variable 2
    Line Input #1, Variable Used

    I am using a Line Input statement as the line sometimes consists of characters which get lost with a simple Input statement.
    Any hints would be appreciated.

    Thanks
Working...