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

Another question. What if I wanted this to run every minute. The cod
below when ran will excute once i.e. 1 minute after NOW. However i
does not run again. In order to dot this, do I have to make th
SetAlarm sub call itself befor the EndSub line (i.e. recursiv
programming)?

Thanks



Sub SetAlarm()
Application.OnTime Now + TimeValue("00:01:00"), "DisplayAlarm"
End Sub

Sub DisplayAlarm()
Beep
MsgBox "Wake up. Its time for your afternoon break!"

End Su

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