Greetings Excel Sages
Please Help... I'm trying to create a counter in excel with a fixed value of 15 minutes and every time that it reaches zero, it will put an incremental integer on a specified cell then it should loop back to start the counter. i i also wanted to put a start button and end button.
i got this from another thread but this one displays a message instead
Sub Countup()
Dim CountDown As Date
CountDown = Now + TimeValue("00:00:01")
Application.OnTime CountDown, "Realcount"
End Sub
Sub Realcount()
Dim count As Range
Set count = [a1]
count.Value = count.Value - TimeSerial(0, 0, 1)
If count <= 0 Then
MsgBox "Countdown complete."
Exit Sub
End If
Call Countup
End Sub
Please Help... I'm trying to create a counter in excel with a fixed value of 15 minutes and every time that it reaches zero, it will put an incremental integer on a specified cell then it should loop back to start the counter. i i also wanted to put a start button and end button.
i got this from another thread but this one displays a message instead
Sub Countup()
Dim CountDown As Date
CountDown = Now + TimeValue("00:00:01")
Application.OnTime CountDown, "Realcount"
End Sub
Sub Realcount()
Dim count As Range
Set count = [a1]
count.Value = count.Value - TimeSerial(0, 0, 1)
If count <= 0 Then
MsgBox "Countdown complete."
Exit Sub
End If
Call Countup
End Sub
Last edited: