Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default Evaluate time spent on macro running

I was thinking of retrieving the time at the beginning of the macro, eg
in 10:31:02 converted to seconds (=37802 or sth) and then the time of
"seconds" at the end. Then subtract it and voila - convert it to
minutes and seconds (the macro runs for about 2-5 mins.

Is there any quick way to do that? Or is there a smarter way?

Cheers

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Evaluate time spent on macro running

Sub RunTimer()
Dim nTime As Double
Dim i As Long, j As Long

nTime = Timer
For i = 1 To 1000000
For j = 1 To 100
Next j
Next i

MsgBox Format((Timer - nTime), "0.0 ""seconds""")
End Sub

--
HTH

Bob Phillips

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

"Morris" wrote in message
ups.com...
I was thinking of retrieving the time at the beginning of the macro, eg
in 10:31:02 converted to seconds (=37802 or sth) and then the time of
"seconds" at the end. Then subtract it and voila - convert it to
minutes and seconds (the macro runs for about 2-5 mins.

Is there any quick way to do that? Or is there a smarter way?

Cheers



Reply
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
Average of time spent monthly getting DIV/0 error Kelway07 Excel Worksheet Functions 2 August 5th 09 10:10 PM
Average time spent to # of events Jennifer Excel Worksheet Functions 2 December 11th 08 05:01 PM
Running Total for Time Spent for a project in 1 month Chart_Maker_Wonderer Excel Worksheet Functions 5 March 8th 07 06:41 PM
How can I show time spent? L Excel Worksheet Functions 1 May 8th 06 03:13 PM
Funcation to average the Time spent subbu Excel Worksheet Functions 1 December 7th 04 09:38 AM


All times are GMT +1. The time now is 02:19 AM.

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

About Us

"It's about Microsoft Excel"