My excel app requires a refresh of all data every minute or so. I have that part done. What I would like to do is write to a log file every time a refresh is done, reporting errors and what not. Problem is, I don't want these log files getting to large in size. I have the idea in my head, how I want to do it. I just can't seem to get the code down. Here's an idea of what I'm trying to do:
I would have 1 log file called mach.log. That would be the primary file being written to all the time. I would then have in code to check the size of that file before writing to it, if it's over 250000 bytes, then rename mach.log to "mach" &Date& ".log". And then start with a clean mach.log all over again. Something like this (this is pretty ruff at this point):
set f = mach.log 'you get the point....
if f.size > 250000 then
f.rename ("mach." & Date & ".log")
else
f.write(....)
end if
Hopefully you follow...? The problem? Is there an actual method .rename? I can't find anything that would do that...
This message was edited by charlie79 on 2002-03-26 08:23
I would have 1 log file called mach.log. That would be the primary file being written to all the time. I would then have in code to check the size of that file before writing to it, if it's over 250000 bytes, then rename mach.log to "mach" &Date& ".log". And then start with a clean mach.log all over again. Something like this (this is pretty ruff at this point):
set f = mach.log 'you get the point....
if f.size > 250000 then
f.rename ("mach." & Date & ".log")
else
f.write(....)
end if
Hopefully you follow...? The problem? Is there an actual method .rename? I can't find anything that would do that...
This message was edited by charlie79 on 2002-03-26 08:23