Results 1 to 2 of 2

Thread: Load Text Into TextBox

  1. #1

    Thread Starter
    Addicted Member slashandburn's Avatar
    Join Date
    Aug 1999
    Location
    Marietta, Ga
    Posts
    229

    Post

    How can i load text from a .TXT file into a textbox?

  2. #2
    Guru Aaron Young's Avatar
    Join Date
    Jun 1999
    Location
    Red Wing, MN, USA
    Posts
    2,177

    Post

    Code:
    Private Sub cmdLoadText_Click()
        Dim sText As String
        Dim iFile As Integer
    
        iFile = FreeFile
        Open "C:\SomeTextFile.txt" For Input As iFile
        sText = Input(LOF(iFile), iFile)
        Close iFile
        Text1 = sText
    End Sub
    ------------------
    Aaron Young
    Analyst Programmer
    [email protected]
    [email protected]


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