'add this to the top of your project
Imports System.IO
'----
'add this function and call it from your button_click event:
Private Function SaveResults() As Boolean
Try
Dim myFile As FileInfo
Dim myPath As String = "Enter_your_file_save_path_here.txt"
'delete the file if it is already there:
myFile = New FileInfo(myPath)
If myFile.Exists Then
myFile.Delete()
End If
Dim mySW As New StreamWriter(myPath)
mySW.WriteLine("This is the start of the results")
mySW.WriteLine("VALUE 1: " + textbox1.text)
mySW.WriteLine("VALUE 2: " + textbox2.text)
'...
mySW.WriteLine("This is the end of the results")
mySW.Close()
myFile = Nothing
Return True
Catch ex As Exception
If Trace.IsEnabled Then Trace.Write("Error saving Results", ex.ToString())
Return False
End Try
End Function