ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   TIMING EXECUTION DURATION! (https://www.excelbanter.com/excel-programming/375164-timing-execution-duration.html)

Jay Dean

TIMING EXECUTION DURATION!
 
This macro when added to my code should write the time duration it takes
for my code to execute (from start to finish) in minutes or seconds in
Range("A1") as a string like "Total Execution Time: X seconds".

Any help would appreciated!

Thanks
Jay



*** Sent via Developersdex http://www.developersdex.com ***

Bob Phillips

TIMING EXECUTION DURATION!
 
Dim nTime As Double

nTime = Timer
... your code
Next

Range("a1")Value ="Total execution time: " & Timer - nTime & " seconds"


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"jay dean" wrote in message
...
This macro when added to my code should write the time duration it takes
for my code to execute (from start to finish) in minutes or seconds in
Range("A1") as a string like "Total Execution Time: X seconds".

Any help would appreciated!

Thanks
Jay



*** Sent via Developersdex http://www.developersdex.com ***





All times are GMT +1. The time now is 03:06 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com