Hi all.
looking for help with countdown timer codes that continue counting pass zero.
found these codes
like to go further by continue counting after zero. start counting from 10 minutes to 30 minutes after zero
instead of color background, i like the font to change color. turn red after exceed zero.
hope this is not too much to ask.
any help is much appreciated.
Thanks
looking for help with countdown timer codes that continue counting pass zero.
found these codes
Code:
Sub starttimer()Application.OnTime Now + TimeValue("00:00:01"), "nexttick"
End Sub
Sub nexttick()
If Sheet1.Range("B1") = 0 Then Exit Sub
Sheet1.Range("B1").Value = Sheet1.Range("B1").Value - TimeValue("00:00:01")
If Sheet1.Range("B1").Value <= TimeValue("00:00:10") Then
Sheet1.Shapes("TextBox 1").Fill.ForeColor.RGB = RGB(255, 0, 0)
Else
Sheet1.Shapes("TextBox 1").Fill.ForeColor.RGB = RGB(255, 255, 0)
End If
starttimer
End Sub
Sub stoptimer()
On Error Resume Next
Application.OnTime Now + TimeValue("00:00:01"), "nexttick", , False
End Sub
Sub ResetTimer()
Sheet1.Range("B1") = TimeValue("00:02:00") ' make this the time you want to reset it to
starttimer
End Sub
instead of color background, i like the font to change color. turn red after exceed zero.
hope this is not too much to ask.
any help is much appreciated.
Thanks