Re: timer
- From: "Tom Ogilvy" <twogilvy@xxxxxxx>
- Date: Fri, 16 Mar 2007 17:55:21 -0400
Just to supplement Gordon's response.
Timer has about 1 second resolution which isn't very good for timing code
unless you do a lot of repetitions within the timing loop.
Here is an article showing how to use more precise procedures:
..
How To Use QueryPerformanceCounter to Time Code
http://support.microsoft.com/kb/172338/en-us
--
Regards,
Tom Ogilvy
"Gord Dibben" <gorddibbATshawDOTca> wrote in message
news:3p2mv29diij04ut4eaq8s18dr34pgsnn24@xxxxxxxxxx
Mike
Example of using a Tmer
Sub dostuff()
StartTime = Timer
For Each cell In Range("A1:AA1000")
cell.Value = "qwertyuiop"
Next
MsgBox Timer - StartTime
End Sub
Stick the StartTime = Timer line wherever you want to start timing in
your Sub
MsgBox line when done.
Gord Dibben MS Excel MVP
On Fri, 16 Mar 2007 12:47:27 -0600, "mike allen" <mikeallen77@xxxxxxxxxxx>
wrote:
odd question: is there code that will start a "stopwatch" (in seconds)
upon
activating one sub then stop and display the time elapsed between
activating
the first sub a second sub on the second sub?
.
- Follow-Ups:
- Re: timer
- From: Gord Dibben
- Re: timer
- Prev by Date: Re: Turning Automatic Calculation On after Workbook loads
- Next by Date: RE: getting worksheetnames as links.
- Previous by thread: Re: timer
- Next by thread: Re: timer
- Index(es):