Public Function WriteTxtFile(ByVal strData As String, _
ByVal FileName As String, _
Optional ByVal ErrInfo As String = "") As Boolean
' Dim Contents As String
Dim bAns As Boolean = False
Dim objReader As IO.StreamWriter
Try
objReader = New IO.StreamWriter(Application.StartupPath + "\" + FileName)
objReader.Write(strData)
objReader.Close()
bAns = True
Catch Ex As Exception
ErrInfo = Ex.Message
End Try
Return bAns
End Function
' seems to overwrite the file with the new value, 1 line at all times, i need it to each time its executed to add the string to the file on a new line