I have VBA code for a Countdown timer that works great for one cell per sheet, but I want it to work for multiple cells in the same column.
This code works for one cell. In this case it is referencing cell G6. But I would like to run the timer on any active cell in Column G.
I tried this (Set Count = ActiveCell.Range("G4:G100").Select), and some other variations of that same concept, but it does not work. I get error type "Mismatch". I'm completely stuck. Any help is much appreciated.
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 = [G6]
Count.Value = Count.Value - TimeSerial(0, 0, 1)
If Count <= 0 Then
MsgBox "Countdown complete."
Exit Sub
End If
Call Countup
End Sub
Bookmarks