LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 586
Default How can I time the speed of a macro?

I would like to time the speed of a macro. I currently use this code, but
the StartTime and EndTime are the same, is that right? I don't think the
Time function is precise enough. Is there a accurate way of timing the speed
of a macro?

Sub TimeMacro()

Dim StartTime As Single
Dim EndTime As Single

StartTime = Time
Debug.Print "Start Time = " & StartTime

' my code here

EndTime = Time
Debug.Print "End Time = " & EndTime

Debug.Print "Elapsed Time = " & EndTime - StartTime

End Sub

--
Cheers,
Ryan
 
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
Calculating Time from Speed and Distance? John[_6_] Excel Worksheet Functions 4 April 3rd 23 04:37 PM
Time the Execution Speed of Procedure in Milliseconds RyanH Excel Programming 1 August 24th 08 10:44 PM
Excel 2002: Need to speed up calculation and response time Mr. Low Excel Discussion (Misc queries) 2 May 6th 08 04:26 PM
How do I get speed given time (hh:mm:ss) and distance in Excel? Charlie_007 Excel Worksheet Functions 1 September 24th 06 05:02 AM
How to calculate speed given distance and mm:ss time format? rrl Excel Discussion (Misc queries) 1 October 21st 05 05:39 PM


All times are GMT +1. The time now is 12:51 PM.

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

About Us

"It's about Microsoft Excel"