Excel
A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
2,161 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I am able to create a countdown timer in Excel with VBA, but we are required to use Excel web with scripts. Does an equivalent for VBA's "Application.OnTime" exist in office scripts?
End goal is to setup two buttons:
below is the VBA code I've used for countdown timers but I cannot convert it to scripts if Application.OnTime does not exist in office scripts.
Thanks!
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