Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

save text in a field to a text file

Status
Not open for further replies.

Treme24

Programmer
Jun 12, 2000
1
US
I want to be able to type text in a text box, click a command button, and have it save the text to an already existing .txt file.  How do I do it?
 
well , one of the easier ways and more powerful ways is to use FileSystemObject(can be added by adding a reference called Microsoft Scripting Runtime)<br><br>I think it'll go something like this, lets say you want to create a txt from scratch.<br><br>Dim fs as new FileSytemObject<br>Dim MyTxt as TextStream<br><br>MyTxt = fs.OpenTextFile(&quot;C:\MyText.txt&quot;, forwriting)<br><br>MyTxt.WriteLine Text1.text<br>MyTxt.Close<br><br>you can probally do appends, by changing the second parameter of the Open Command. <p>Karl<br><a href=mailto:kb244@kb244.8m.com>kb244@kb244.8m.com</a><br><a href= </a><br>Experienced in , or have messed with : VC++, Borland C++ Builder, VJ++6(starting),VB-Dos, VB1 thru VB6, Delphi 3 pro, Borland C++ 3(DOS), Borland C++ 4.5, HTML,Visual InterDev 6, ASP(WebProgramming), QBasic(least i didnt start with COBOL)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top