• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 133
  • Last Modified:

writing to a txt file from a text box

How do I take text from a textbox and write it to a txt file
0
jrisi03
Asked:
jrisi03
1 Solution
 
bobbit31Commented:
Dim ff as integer
ff = FreeFile
open "C:\my documents\outputfile.txt" For Output as #ff
Print #ff, text1.text
close(ff)
0
 
supunrCommented:
if you use a richtextbox, then it is very simple.

to save text....
RichTextBox1.SaveFile "C:\Mydata.txt", rtfText

to load text...
RichTextBox1.LoadFile "C:\Mydata.txt", rtfText

' Good Luck!
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now