Good Morning,
I would appreciate help with the following as I've been stuck on it for days and can't seem to work it out. Google hasn't helped much either!
I've managed to set up a live auto-clock which displays live time as per my system time, to the second, using the following code in Sheet1 and a separate module. It works great.
Dim SchedRecalc As Date
Sub Recalc()
With Sheet1.Range("A1")
.Value = Format(Time, "hh:mm:ss")
End With
Call SetTime
End Sub
Sub SetTime()
SchedRecalc = Now + TimeValue("00:00:01")
Application.OnTime SchedRecalc, "Recalc"
End Sub
Sub Disable()
On Error Resume Next
Application.OnTime EarliestTime:=SchedRecalc, Procedure:="Recalc", Schedule:=False
End Sub
Now what I want is for popup message boxes (requiring just an 'OK' click) to appear when that live clocks reaches certain times. I've tried everything I am aware of like the following but it just won't work. When I run the macro on it's own it works, it's just when I try to link it to the other codes it won't work.
Private Sub Popup1()
If cell(A1) = "08:55:00" Then
Run "Popup"
End Sub
Any ideas please?
I would appreciate help with the following as I've been stuck on it for days and can't seem to work it out. Google hasn't helped much either!
I've managed to set up a live auto-clock which displays live time as per my system time, to the second, using the following code in Sheet1 and a separate module. It works great.
Dim SchedRecalc As Date
Sub Recalc()
With Sheet1.Range("A1")
.Value = Format(Time, "hh:mm:ss")
End With
Call SetTime
End Sub
Sub SetTime()
SchedRecalc = Now + TimeValue("00:00:01")
Application.OnTime SchedRecalc, "Recalc"
End Sub
Sub Disable()
On Error Resume Next
Application.OnTime EarliestTime:=SchedRecalc, Procedure:="Recalc", Schedule:=False
End Sub
Now what I want is for popup message boxes (requiring just an 'OK' click) to appear when that live clocks reaches certain times. I've tried everything I am aware of like the following but it just won't work. When I run the macro on it's own it works, it's just when I try to link it to the other codes it won't work.
Private Sub Popup1()
If cell(A1) = "08:55:00" Then
Run "Popup"
End Sub
Any ideas please?