How Can I write a function that calculate the time it take to coomplete all the loops

  • Thread starter Thread starter ripamonti
  • Start date Start date
R

ripamonti

I have many loops in my vba programme.
How Can I write a function that calculate the time it take to coomplete
all the loops?
thanks
 
Set a timer at the start of the loop, and the end

nTime = Timer
'loop code
MsgBox Timer - nTime

but you need to run several times and average (and ignore best and worst?)
as other activity will affect the timings

--
---
HTH

Bob

(change the xxxx to gmail if mailing direct)
 

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

Back
Top