Prog appends a textfile. Don't want user able to delete or modify while form open. How do I do this?? - As long as form is open user cannot modify or delete textfile. But so the file can be edited from within form
How do I do this.
Here is my code so far
Public Class Form1
Dim FILE_NAME As String = "C:\Users\Birthday\Documents\info.txt"
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim objWriter As New System.IO.StreamWriter(FILE_NAME, True)
For i = 0 To 4
objWriter.WriteLine(InputBox("Enter info"))
Next
objWriter.Close()
End Sub
End Class
How do I do this.
Here is my code so far
Public Class Form1
Dim FILE_NAME As String = "C:\Users\Birthday\Documents\info.txt"
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim objWriter As New System.IO.StreamWriter(FILE_NAME, True)
For i = 0 To 4
objWriter.WriteLine(InputBox("Enter info"))
Next
objWriter.Close()
End Sub
End Class