Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- How to add multiple textboxes or information to a sequential file?
- Private Sub addBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles addBtn.Click
- 02
- Dim path As String = _
- 03
- "C:\Users\KeraBaby\Desktop\Payroll\Payroll Project Form\Payroll Project Form\bin\Debug"
- 04
- If My.Computer.FileSystem.FileExists("Employees.txt") Then
- 05
- My.Computer.FileSystem.WriteAllText("Employees.txt", Me.empIDbox.Text, False)
- 06
- My.Computer.FileSystem.WriteAllText("Employees.txt", Me.fnamebox.Text, False)
- 07
- My.Computer.FileSystem.WriteAllText("Employees.txt", Me.lnamebox.Text, False)
- 08
- My.Computer.FileSystem.WriteAllText("Employees.txt", Me.salbox.Text, False)
- 09
- 10
- Else
- 11
- MessageBox.Show("File does not exist", "error", MessageBoxButtons.OK, MessageBoxIcon.Information)
- 12
- End If
- 13
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement