Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
On_timer Q
The code below, was taken from Chip Pearsons web site on On-Timers.
How could I tailor it so that the StartTimer only runs at 10:00am each 24 hours but only between two variable dates that are held in Sheet1 A1 & B1? Thanks Public RunWhen As Double Public Const cRunIntervalSeconds = 1440 ' 24 Hours Public Const cRunWhat = "The_Sub" ' the name of the procedure to run Sub StartTimer() RunWhen = Now + TimeSerial(0,0,cRunIntervalSeconds) Application.OnTime EarliestTime:=RunWhen, Procedu=cRunWhat, Schedule:=True End Sub Sub The_Sub() ''''''''''''''''' ' Your Code Here ''''''''''''''''' StartTimer End Sub |