Results 1 to 4 of 4

Thread: [RESOLVED] Importing text file into active form

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2007
    Posts
    2

    Resolved [RESOLVED] Importing text file into active form

    Hi

    I have made a user interface for a dos based program, the dos based program stores its results in a text file. Is there a way to import this directly into a active form window or a text box?

    thanks


    steve
    Last edited by Hack; May 2nd, 2007 at 05:55 AM. Reason: Added RESOLVED to thread title and green resolved checkmark

  2. #2
    "Digital Revolution"
    Join Date
    Mar 2005
    Posts
    4,471

    Re: Importing text file into active form

    To load a standard text file into a TextBox you can use:

    Code:
    Private Sub Form_Load()
        Dim intFF As Integer
        
        intFF = FreeFile
        
        Open "C:\path\to\your\file\here.txt" For Input As #intFF
            Text1.Text = Input(LOF(intFF), intFF)
        Close #intFF
        
    End Sub

  3. #3

    Thread Starter
    New Member
    Join Date
    May 2007
    Posts
    2

    Re: Importing text file into active form

    Thanks

    That worked a treat!!!!!!!!

  4. #4
    Fanatic Member robbedaya's Avatar
    Join Date
    Jul 2002
    Location
    Belgium
    Posts
    872

    Re: Importing text file into active form

    Use the Thread Tools and "Mark Thread Resolved"
    - Use the thread tools to Mark your Thread as Resolved when your question is answered.
    - Please Rate my answers if they where helpful.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width