JohnNZExcel
asked on
Excel VBA - Making a stopwatch (with milliseconds) that can show a running clock time
I have read a number of posts online relating to the making of a stopwatch in VBA. I have been able to make the foundation of what i am looking for and i am now trying to tidy it up.
I am looking for suggestions of how i can make a cell show a running clock (the elapsed time). The stopwatch will be used to time cyclists on a velodrome so they may do 40 or 50 laps (and there will be 4 or 5 riders at once on the track). I will make a button for each rider which populates a specific column with split times.
Here is my code for the macro that adds a split time to the list.
Sub Athlete1Split()
ActiveSheet.Range("B58").E nd(xlUp).O ffset(1, 0).Select
ActiveCell.Value = Format(Time, "hh:mm:ss:" & Right(Format(Timer, "#0.00"), 2))
End Sub
Stopwatch.xlsm
I am looking for suggestions of how i can make a cell show a running clock (the elapsed time). The stopwatch will be used to time cyclists on a velodrome so they may do 40 or 50 laps (and there will be 4 or 5 riders at once on the track). I will make a button for each rider which populates a specific column with split times.
Here is my code for the macro that adds a split time to the list.
Sub Athlete1Split()
ActiveSheet.Range("B58").E
ActiveCell.Value = Format(Time, "hh:mm:ss:" & Right(Format(Timer, "#0.00"), 2))
End Sub
Stopwatch.xlsm
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Do these runners share the same clock or do have individual counters?
ASKER
Good question. I will make a single clock that will be used for all. The start button will start the clock for all athletes but then individual buttons for each athlete will record the split times.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.