LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Logging data using the same textfile over and over again

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?

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
DDE Logging Data Loss in Excel PSY_UK Excel Discussion (Misc queries) 0 December 1st 05 09:01 AM
Live DDE Data Logging MadManInABox Excel Discussion (Misc queries) 1 September 19th 05 09:40 AM
Logging Data Single Input ExcelDanHarris Excel Programming 1 July 9th 05 05:44 PM
Copy data from textfile, paste and transpose to sheet2 m4nd4li4 Excel Programming 1 March 14th 05 04:05 PM
Logging data from a web query Rob Excel Programming 1 July 31st 03 01:25 PM


All times are GMT +1. The time now is 07:00 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"