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

Importing Data From a Text File

P: 4
How do you select a specific line from an open file and input those specific into a designated textbox?

When I open up a file with the opendialog() and then select the file that I want to import(or to pull data from). This is the text file setup that I am trying to get the information from:

--------------------------------------------------------
ASSIGN.RSM A 6:00:00 "Initialize Times"
ASSIGN.RSM B 6:10:59
ASSIGN.RSM C 6:02:02
--------------------------------------------------------

Now I want to input the first line if they select A, which designates the first line of the text file and then from there to input the 6 in textbox1.text and 00 into textbox2.text and 00 into textbox3.text. Now if they select B, then it'll pull the information from line 2 and put the 6 in textbox1.text and the 10 in textbox2.text and etc. How would I go about doing that? Thanks.
Mar 15 '07 #1
Share this Question
Share on Google+
4 Replies


Expert 5K+
P: 8,434
Is this for an assignment? What version of VB?
Mar 15 '07 #2

P: 4
This is not for an assignment, yet for a personal thing I am creating. I am using Visual Basic 2005 Express Edition. I am new in the programming world. I am slowly learning these codings and understanding their application. Thanks.

brottmayer
Mar 15 '07 #3

P: 2
Is this for an assignment? What version of VB?
What if it is? :)
Mar 15 '07 #4

P: 4
Any help from anyone would be great. Even if it's something little that i can play around and figure it out i guess. Thanks in advance for your help.
Mar 16 '07 #5

Post your reply

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