PDA

View Full Version : [SOLVED] dynamic reminder



frsm
07-31-2007, 05:39 AM
hi all

in sheet ("main")range("a1"). i put a dynamic time like(13:30:00)for example
i need a code that when the current time now() = ("a1").value to run msgbox code

is it possible

thanks alot

Bob Phillips
07-31-2007, 06:25 AM
This should do it. It checks every 10 seconds



Sub CheckTime()
If Time >= Worksheets("Main").Range("A1").Value Then
'run macro
Else
Application.OnTime Time + TimeSerial(0, 0, 10), "CheckTime"
End If
End Sub

frsm
07-31-2007, 06:28 AM
XLd thank you very much it is great