LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 454
Default 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

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 12:13 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"