Excel countdown timer using macro vba

1,283 Views

Excel countdown timer working on an edit mode

Sub ShowTime()

Dim aka As Integer
Dim abc As Long

aka = Worksheets("Sheet1").Range("I2")
abc = 7
If aka < abc Then
Call Timer

Else
Worksheets("Sheet1").Range("I2") = 0
Worksheets("Sheet1").Range("I4") = "Macro complete"
End If
End Sub

Private Sub Timegap()
Dim akb As Integer
Dim akc As Integer

akb = Worksheets("Sheet1").Range("I2")
akc = akb + 1
Worksheets("Sheet1").Range("I2") = akc
Call ShowTime
End Sub
 
Private Sub Timer()
Worksheets("Sheet1").Range("I4").ClearContents
interval = Now() + TimeSerial(0, 0, 5)
Application.OnTime interval, procedure:="Timegap"
 End Sub
13940cookie-checkExcel countdown timer using macro vba

Author: yawot

Leave a Reply

Your email address will not be published. Required fields are marked *