Macro timer?

G

Guest

I run a macro everyday which imports a txt file that goes through some
manipulation then exports out. The problem is that the import file varies in
size so that macro run time varies as well. What I want to do is add a timer
to the macro that records the amount of time the macro took to run. I would
use this time figure to track run time trends.

So my question is how do I add the timer. Is there a built-in function or
is it going to require vb code?

Thanks!

Rich
 
S

Steve Schapel

Rich,

I think I would make a table with a StartTime and EndTime fields, to
record your "macro runs". You could have a form open at the time that
your procedure happens, bound to this table and open at a new record,
and then use a SertValue action at both the beginning and end of the
macro to write Now() into the applicable field. An alternative approach
(with the same result) would be to use an OpenQuery action at the
baginning and end of the macro to run an Append and Update query to
write the Now() vbalues to the table. Then you can calculate the run
time from the difference between these two fields.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top