elianeasmar
Well-known member
- Joined
- Oct 3, 2013
- Messages
- 76
- Programming Experience
- Beginner
Hello.
I want to Export the content of my textboxes and comboboxes to a Notepad File.
I have this code:
Private Sub btnNotepad_Click(sender As Object, e As EventArgs) Handles btnNotepad.Click
Dim myOutputFile As String = "C:\Users\ELIANE\Desktop\Exported-to-Notepad.txt"
Dim myText As String = String.Format("{0},{1},{2},{3},{4},{5}", txtCode.Text, cmbTitle.Text, txtName.Text, cmbPosition.Text, txtAddress.Text,txtPhoneNumber.Text)
My.Computer.FileSystem.WriteAllText(myOutputFile, myText, False)
End Sub
this code works. But i need your help in something.
If i write a second time in the notepad , the first record i writed before will be gone.
Any help keeping all the records in the notepad separated by a line?
or a carriage return or something?
Thank You
I want to Export the content of my textboxes and comboboxes to a Notepad File.
I have this code:
Private Sub btnNotepad_Click(sender As Object, e As EventArgs) Handles btnNotepad.Click
Dim myOutputFile As String = "C:\Users\ELIANE\Desktop\Exported-to-Notepad.txt"
Dim myText As String = String.Format("{0},{1},{2},{3},{4},{5}", txtCode.Text, cmbTitle.Text, txtName.Text, cmbPosition.Text, txtAddress.Text,txtPhoneNumber.Text)
My.Computer.FileSystem.WriteAllText(myOutputFile, myText, False)
End Sub
this code works. But i need your help in something.
If i write a second time in the notepad , the first record i writed before will be gone.
Any help keeping all the records in the notepad separated by a line?
or a carriage return or something?
Thank You