I'm trying to append to the end of a log file but misc characters appear once the data has been transferred...
Private Sub Command1_Click()
n = (Chr(13) & Chr(10) & "*****" & Chr(13) & Chr(10) & "Monday 15 July 2001" & Chr(13) & Chr(10) & "Testing This" & Chr(13) & Chr(10) & "Hope it works"
Open "U:\New.Txt" For Binary As #1
Put #1, LOF(1) + 1, n
Close #1
End Sub
The result in New.txt is...
9
*****
Monday 15 July 2001
Testing This
Hope it works 9
*****
Monday 15 July 2001
Testing This
Hope it works 9
*****
Monday 15 July 2001
Testing This
Hope it works 9
*****
Monday 15 July 2001
Testing This
Hope it works
... it always adds the box, space, 9 when it restarts. How can I stop it doing this?
Thanks...
Private Sub Command1_Click()
n = (Chr(13) & Chr(10) & "*****" & Chr(13) & Chr(10) & "Monday 15 July 2001" & Chr(13) & Chr(10) & "Testing This" & Chr(13) & Chr(10) & "Hope it works"
Open "U:\New.Txt" For Binary As #1
Put #1, LOF(1) + 1, n
Close #1
End Sub
The result in New.txt is...
9
*****
Monday 15 July 2001
Testing This
Hope it works 9
*****
Monday 15 July 2001
Testing This
Hope it works 9
*****
Monday 15 July 2001
Testing This
Hope it works 9
*****
Monday 15 July 2001
Testing This
Hope it works
... it always adds the box, space, 9 when it restarts. How can I stop it doing this?
Thanks...