Hi everyone,
My countdown time and count up time does not start in my workbook. can anyone help me with that.
..Marc
File open the following link for your reference https://sites.google.com/site/marcmy...m/file-cabinet
Dim CountDown As Date Sub Timer() CountDown = Now + TimeValue("00:00:01") Application.OnTime CountDown, "Reset" End Sub Sub Reset() Dim RNG As Range, Counter As Range Application.ScreenUpdating = False Application.EnableEvents = False Set RNG = Sheets("Option1").Range("I8", Sheets("Option1").Range("C" & Rows.Count).End(xlUp).Offset(0, 6)) On Error Resume Next If RNG.Rows.Count = RNG.Offset(, 3).SpecialCells(xlConstants).Rows.Count Then Sheets("Option1" & "FTS").PAUSE.Enabled = False Sheets("Option1" & "FTS").CONTINUE.Enabled = True DisableTimer Exit Sub End If For Each Counter In RNG If Counter = "" Then Counter = Counter.Offset(0, -1) If Cells(Counter.Row, "K") = "" Then If Counter > 0 Then Counter = Counter - TimeValue("00:00:01") Else Counter.Offset(0, 1) = Counter.Offset(0, 1) + TimeValue("00:00:01") End If End If Next Counter Call Timer Application.ScreenUpdating = True Application.EnableEvents = True End Sub Sub DisableTimer() On Error Resume Next Application.OnTime EarliestTime:=CountDown, Procedure:="Reset", Schedule:=False End Sub
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks