Thread: On time Event
View Single Post
  #11   Report Post  
Posted to microsoft.public.excel.programming
ExcelMonkey[_131_] ExcelMonkey[_131_] is offline
external usenet poster
 
Posts: 1
Default On time Event

thanks Tom. I guess I could call the StartTimer sub again at the end o
the final sum too.

Public RunWhen As Double
Public Const cRunIntervalSeconds = 60 ' one minute
Public Const cRunWhat = "The_Sub"

Sub StartTimer()

RunWhen = Now + TimeSerial(0, 0, cRunIntervalSeconds)
Application.OnTime earliesttime:=RunWhen, procedu=cRunWhat, _
schedule:=True
End Sub

Sub The_Sub()
MsgBox "Wake up. Its time for your afternoon break!"
StartTimer
End Su

--
Message posted from http://www.ExcelForum.com