Private Sub Write2_Click()
Dim fso As FileSystemObject
Dim Noob As File
Dim Noobs As TextStream
Const forwriting = 2
Set fso = New FileSystemObject
'Creates a FileObject
Set Noob = fso.GetFile("C:\Documents and Settings\dkavanagh\Desktop\project docs\Project Documents\VB Project\test.txt")
'Opens the file as TextStream
Set Noobs = Noob.OpenAsTextStream(forwriting, True)
Noobs.WriteLine vbNewLine + vbNewLine + "Output for Timer 1 Status" + vbNewLine + " " + DMY + " " + GMT + vbNewLine + vbNewLine + Text1.Text + vbNewLine + vbNewLine + "__________________________________________________"
End Sub
Basically all i want to do is add text to text file i.e. generate a report file with timestamps
I can write to the file no problem but if i enter more text into the text1.text box it overwrites the text already in the file, how do i get around this. I bet its something simple but i just cant seem to fix it
Thanks guys

New Topic/Question
Reply




MultiQuote



|