Importing Data From a Text File

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • brottmayer
    New Member
    • Mar 2007
    • 4

    #1

    Importing Data From a Text File

    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.
  • Killer42
    Recognized Expert Expert
    • Oct 2006
    • 8429

    #2
    Is this for an assignment? What version of VB?

    Comment

    • brottmayer
      New Member
      • Mar 2007
      • 4

      #3
      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
      Last edited by brottmayer; Mar 15 '07, 09:36 PM. Reason: Information addition

      Comment

      • itdontgo
        New Member
        • Mar 2007
        • 2

        #4
        Originally posted by Killer42
        Is this for an assignment? What version of VB?
        What if it is? :)

        Comment

        • brottmayer
          New Member
          • Mar 2007
          • 4

          #5
          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.

          Comment

          Working...