Live Auto-Clock and Popup Messages

drefiek

New Member
Joined
Jan 30, 2014
Messages
8
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?
 
Thanks you've solved everything! :)

But I can't promise I won't need help on this thread again...!

Have a lovely day.

Regards,
Keifer
 
Upvote 0

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.

Forum statistics

Threads
1,216,084
Messages
6,128,728
Members
449,465
Latest member
TAKLAM

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top