Thread: timer
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default timer

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"
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?