This is the code for the first button to save the text to your file. Make sure the textbox you want is Textbox1 as it specifies.
Code:
If System.IO.File.Exists(C:\FileOfChoice.txt) = True Then
Dim wr As IO.TextWriter
wr = IO.File.CreateText(C:\FileOfChoice.txt)
wr.Write(TextBox1.Text)
wr.WriteLine()
wr.Flush()
wr.Close()
Now for a button to load the text try:
Code:
Dim FILENAME As String = "C:\FileOfChoice.txt"
If System.IO.File.Exists(FILENAME) = True Then
Dim objReader As New System.IO.StreamReader(FILENAME)
TextBox1.Text = objReader.ReadToEnd
objReader.Close()
Else
MsgBox("File cannot be found")
End If
So there should be two buttons and a textbox (Textbox1)
The first button saves the text in the textbox to the file, and the second loads the text from the file into the textbox.
Hope that helps. :-)