Hello again,
Afterposting my Question found this Code in a thread here and it works as written, now can anyone tell me how to use this same bit of Code on same worksheet say another 19 lines.
'Written: February 01, 2011
'Author: Leith Ross
Private TimerCell As Range
Private TimerEnabled As Boolean
Private TimerValue As Double
Sub SetTimerCell()
Set TimerCell = Worksheets("Sheet1").Range("D2")
TimerCell.NumberFormat = "@"
End Sub
Sub StartTimer()
If TimerEnabled Then Exit Sub
If TimerCell Is Nothing Then SetTimerCell
TimerEnabled = True
ShowTime
End Sub
Sub StopTimer()
TimerEnabled = False
End Sub
Sub ResetTimer()
TimerEnabled = False
If TimerCell Is Nothing Then SetTimerCell
TimerValue = 0
TimerCell = "00:00.0"
End Sub
Sub ShowTime()
Dim Delay As Single
Dim Mins As Integer
Dim Secs As Variant
Dim StartTime As Single
Delay = 0.1
StartTime = Timer
Do While TimerEnabled
While Timer < StartTime + Delay: Wend
TimerValue = TimerValue + 0.1
Mins = Int(TimerValue) \ 60
Secs = TimerValue - (Mins * 60)
TimerCell.Value = Format(Mins, "00") & ":" & Format(Secs, "00.0")
StartTime = Timer
DoEvents
Loop
End Sub
I have gone in on same worksheet made a Module2 copied the code into it made new Click buttons assianed them to the code in Module2 and it is working but can only have 1 timer running at a time, so is there a way to have multiple timers running at same time ??
Aeneren
Bookmarks