Im using this VBA and i need to apply this to 10 different cells with 2 specific buttons of each cell (stop an start). Its a countdown task tracker.
Public interval As Date
Sub timer()
interval = Now + TimeValue("00:00:01")
If Range("A1").Value = 0 Then Exit Sub
Range("A1") = Range("A1") - TimeValue("00:00:01")
Application.OnTime interval, "timer"
End Sub
Sub stop_timer()
Application.OnTime EarliestTime:=interval, Procedure:="timer", Schedule:=False
End Sub
Bookmarks