Results 1 to 4 of 4

Thread: [RESOLVED] [2005] Writing text from a text box to a .txt file

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jun 2006
    Posts
    250

    Resolved [RESOLVED] [2005] Writing text from a text box to a .txt file

    Hi Everyone,

    How do you export all the text in a text box to a text file?

  2. #2
    Hyperactive Member ProphetBeal's Avatar
    Join Date
    Aug 2006
    Location
    New York
    Posts
    424

    Re: [2005] Writing text from a text box to a .txt file

    This is 1 way...
    VB.NET Code:
    1. Dim objFile As New System.IO.StreamWriter("C:\Output.txt")
    2. objFile.Write(TextBox1.Text)
    3. objFile.Close()
    4. objFile.Dispose()

    Helpful Links:
    VB 6 - How to get the "Key" Value in a collection
    VB.NET - File Search Utility || VB.NET - How to compare 2 directories || VB.NET - How to trust a network share
    VB.NET - Create Excel Spreadsheet From Array || VB.NET - Example Code & Hints you may not know
    VB.NET - Save JPEG with a certain quality (image compression) || VB.NET - DragDrop Files, Emails, and Email Attachments

    Please post some of the code you need help with (it makes it easier to help you)
    If your problem has been solved then please mark the thread [RESOLVED].
    Don't forget to Rate this post

    "Pinky, you give a whole new meaning to the phrase, 'counter-intelligence'."-The Brain-

  3. #3
    Frenzied Member Asgorath's Avatar
    Join Date
    Sep 2004
    Location
    Saturn
    Posts
    2,036

    Re: [2005] Writing text from a text box to a .txt file

    Girraffe download the 101 samples projects from ms to get you started...
    "The dark side clouds everything. Impossible to see the future is."

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Jun 2006
    Posts
    250

    Re: [2005] Writing text from a text box to a .txt file

    thanks everyone,

    the code provided works like i needed it.

    Asgorath, I will also dload your suggestion. Thanks!

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