G
gordon
Hi,
I have a series of forms that collect information from a user. When I write
out my information to a text file after the last file, the values of the
previous forms seem to be blank. I would like to retain the values of
names.textbox1.text and names.textbox2.text for the output file.
Any help greatly appreciated.
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button2.Click
TextBox1.Focus()
Dim names As New Names
Dim sw As New IO.StreamWriter(filer, True) ' True means append
Dim strName As String = names.TextBox1.Text
Dim strValue As String = names.TextBox2.Text
Dim today As Date = Now()
Dim strdate As String = today.ToString("d")
Dim golfScore As String = TextBox1.Text
sw.WriteLine(String.Format("{0},{1},{2},{3}", strName, strValue, strdate,
golfScore))
sw.Flush()
sw.Close()
names.Show()
Me.Hide()
End Sub
I have a series of forms that collect information from a user. When I write
out my information to a text file after the last file, the values of the
previous forms seem to be blank. I would like to retain the values of
names.textbox1.text and names.textbox2.text for the output file.
Any help greatly appreciated.
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button2.Click
TextBox1.Focus()
Dim names As New Names
Dim sw As New IO.StreamWriter(filer, True) ' True means append
Dim strName As String = names.TextBox1.Text
Dim strValue As String = names.TextBox2.Text
Dim today As Date = Now()
Dim strdate As String = today.ToString("d")
Dim golfScore As String = TextBox1.Text
sw.WriteLine(String.Format("{0},{1},{2},{3}", strName, strValue, strdate,
golfScore))
sw.Flush()
sw.Close()
names.Show()
Me.Hide()
End Sub