Trying to make a VBA macro that will auto refresh the package counter and timer after one minute has passed back to zero. Having it connected to a HTML site that has a world clock to get and accurate minute. Reason is for my work I need my associates to induct packages at a set rate per minute and having something visual for them would b much easier.
So far I have a interval timer made with a stop start and reset button, but would love for it to be automated so I can leave it up for them and I don't need to worry about it.
If we have to do 90 packages a minute and have 3 induct points that would be 30 packages a line per minute. Making timer that counts up to 60 and every 2 seconds adds 1 to the package counter is something I've been trying to achieve and need some more expertise in.
Public interval As Date
Sub timer()
If Range("I30").Value = 0 Then Exit Sub
Range("I30") = Range("I30") - TimeValue("00:00:02")
interval = Now + TimeValue("00:00:02")
Application.OnTime interval, "timer"
End Sub
Sub stop_timer()
Application.OnTime EarliestTime:=interval, Procedure:="timer", Schedule:=False
End Sub
Sub reset()
Range("I30").Value = "00:01:00"
End Sub
Display More