you will need to add this above the class declaration:
Then edit the following functions to you needs:
-
Private Sub createTextFile()
-
Dim oTxtWriter As New StreamWriter(path1)
-
oTxtWriter.WriteLine("This is a line")
-
oTxtWriter.Flush()
-
oTxtWriter.Close()
-
End Sub
-
-
Private Sub WriteFile()
-
'can use .append instead of .output
-
Dim Date1 As String = Format$(Now)
-
Dim Date2 As String = Mid(Date1, 1, 10)
-
FileOpen(1, "C:\text123412.txt", OpenMode.Output)
-
Print(1, Date2) ', Environment.NewLine)
-
FileClose(1)
-
End Sub
-
-
Function Readfile(ByVal abc)
-
Dim EntireLine As String
-
Dim oFile As System.IO.File
-
Dim oRead As System.IO.StreamReader
-
oRead = oFile.OpenText("C:\text123412.txt")
-
EntireLine = oRead.ReadToEnd
-
oRead.Close() 'test line
-
Return EntireLine
-
End Function
-
There are much better ways to do this but they work so i use them.
Thanks James