TruongVanThuy
Thành viên mới
- Tham gia
- 30/3/22
- Bài viết
- 11
- Được thích
- 0
Public interval As Date
Sub timer()
If Range("K7").value = 0 Then Exit Sub
Range("K7") = Range("K7") - TimeValue("00:00:01")
interval = Now + TimeValue("00:00:01")
Application.OnTime interval, "timer"
End Sub
Sub pauser_timer()
Application.OnTime EarliestTime:=interval, Procedure:=("timer"), Schedule:=False
End Sub
Sub stop_timer()
Range("K7").value = TimeValue("00:00:01")
End Sub
Sub timer()
If Range("K7").value = 0 Then Exit Sub
Range("K7") = Range("K7") - TimeValue("00:00:01")
interval = Now + TimeValue("00:00:01")
Application.OnTime interval, "timer"
End Sub
Sub pauser_timer()
Application.OnTime EarliestTime:=interval, Procedure:=("timer"), Schedule:=False
End Sub
Sub stop_timer()
Range("K7").value = TimeValue("00:00:01")
End Sub