calfred2808

How to add multiple textboxes or information to a sequential

Nov 11th, 2012
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 0.88 KB | None | 0 0
  1.  
  2. How to add multiple textboxes or information to a sequential file?
  3. Private Sub addBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles addBtn.Click
  4. 02
  5.     Dim path As String = _
  6. 03
  7.         "C:\Users\KeraBaby\Desktop\Payroll\Payroll Project Form\Payroll Project Form\bin\Debug"
  8. 04
  9.     If My.Computer.FileSystem.FileExists("Employees.txt") Then
  10. 05
  11.         My.Computer.FileSystem.WriteAllText("Employees.txt", Me.empIDbox.Text, False)
  12. 06
  13.         My.Computer.FileSystem.WriteAllText("Employees.txt", Me.fnamebox.Text, False)
  14. 07
  15.         My.Computer.FileSystem.WriteAllText("Employees.txt", Me.lnamebox.Text, False)
  16. 08
  17.         My.Computer.FileSystem.WriteAllText("Employees.txt", Me.salbox.Text, False)
  18. 09
  19.  
  20. 10
  21.     Else
  22. 11
  23.         MessageBox.Show("File does not exist", "error", MessageBoxButtons.OK, MessageBoxIcon.Information)
  24. 12
  25.     End If
  26. 13
  27. End Sub
Advertisement
Add Comment
Please, Sign In to add comment