#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Timer

I've developed a math quiz for my children in Excel 2003, with randomly
generated addition, subtraction, multiplication & division problems. I had
to use a macro to copy randomly generated numbers as values, so they don't
recalculate all the time.

My daughter has now asked for a timer to measure how long she takes to
complete all the questions. How do I go about this?

Thanks.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,236
Default Timer

I use this for speed testing different approaches in Excel, but for your
purposes this should work too.

Run the Test procedure as an example.


Declare Function timeGetTime Lib "winmm.dll" () As Long

Dim lngStart As Long

Sub Start()
lngStart = timeGetTime()
End Sub

Function Finish()
Finish = timeGetTime() - lngStart
End Function

Sub Test()
Start
MsgBox "click when ready"
MsgBox Finish & " milliseconds"
End Sub


--
Rob van Gelder - http://www.vangelder.co.nz/excel


"RK" wrote in message
...
I've developed a math quiz for my children in Excel 2003, with randomly
generated addition, subtraction, multiplication & division problems. I had
to use a macro to copy randomly generated numbers as values, so they don't
recalculate all the time.

My daughter has now asked for a timer to measure how long she takes to
complete all the questions. How do I go about this?

Thanks.




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Timer

Thanks Rob. Managed to get it to work.k


"Rob van Gelder" wrote in message
...
I use this for speed testing different approaches in Excel, but for your
purposes this should work too.

Run the Test procedure as an example.


Declare Function timeGetTime Lib "winmm.dll" () As Long

Dim lngStart As Long

Sub Start()
lngStart = timeGetTime()
End Sub

Function Finish()
Finish = timeGetTime() - lngStart
End Function

Sub Test()
Start
MsgBox "click when ready"
MsgBox Finish & " milliseconds"
End Sub


--
Rob van Gelder - http://www.vangelder.co.nz/excel


"RK" wrote in message
...
I've developed a math quiz for my children in Excel 2003, with randomly
generated addition, subtraction, multiplication & division problems. I

had
to use a macro to copy randomly generated numbers as values, so they

don't
recalculate all the time.

My daughter has now asked for a timer to measure how long she takes to
complete all the questions. How do I go about this?

Thanks.






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
Timer Brandon H Excel Discussion (Misc queries) 5 August 9th 07 01:54 PM
Lap-timer kabildgaard Excel Discussion (Misc queries) 0 August 11th 06 03:26 PM
Stopping a Timer / Running a timer simultaneously on Excel Paul23 Excel Discussion (Misc queries) 1 March 10th 06 12:08 PM
API TIMER Seth Excel Programming 0 January 15th 04 01:33 PM
Timer Don Lloyd Excel Programming 0 October 18th 03 03:40 AM


All times are GMT +1. The time now is 04:52 PM.

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"