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

Inputing a specific line from a text file into a variable

P: 22

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

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.

Nov 30 '06 #1
Share this question for a faster answer!
Share on Google+

Post your reply

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