MickeD
Programmer
- Feb 20, 2000
- 54
Hi,
How can I insert row at the Top of text file?
(Something like Error Log - Last ocurred error - on the first line of file)
I try this way:
but this code overwrite the first line.
Help please
How can I insert row at the Top of text file?
(Something like Error Log - Last ocurred error - on the first line of file)
I try this way:
Code:
For i = 1 To 5
f = FreeFile
Open "C:\Errors.log" For Random Access Write As #f
Seek #f, 1
txt = "[" & Now() & "] Line #" & CStr(i)
Put #f, , txt + vbCrLf
Close #f
Next i
but this code overwrite the first line.
Help please