S
Silencer116
Hey all.
I am working on a log-like mechanism in VBA. I programmed the following
sub:
Sub CreateLog()
Datum = Date
Tijd = Time
Set fs = CreateObject("Scripting.FileSystemObject")
Set a = fs.CreateTextFile("H:\test " + Cstr(Datum) + ".txt", True)
a.WriteLine("The process begun @ " + Cstr(Tijd) + " on " + Cstr(Datum))
a.close
End Sub
But this overwrites the textfile over and over again. I would like it
to open the existing textfile, and add a new line (the same line as
above) on top of the other line(s)
The result would be a summary of lines in one textfile. Everytime this
macro is activated i would like to be an line added.
is this possible? if yes, please could anyone help me?
I am working on a log-like mechanism in VBA. I programmed the following
sub:
Sub CreateLog()
Datum = Date
Tijd = Time
Set fs = CreateObject("Scripting.FileSystemObject")
Set a = fs.CreateTextFile("H:\test " + Cstr(Datum) + ".txt", True)
a.WriteLine("The process begun @ " + Cstr(Tijd) + " on " + Cstr(Datum))
a.close
End Sub
But this overwrites the textfile over and over again. I would like it
to open the existing textfile, and add a new line (the same line as
above) on top of the other line(s)
The result would be a summary of lines in one textfile. Everytime this
macro is activated i would like to be an line added.
is this possible? if yes, please could anyone help me?