Thread: On time Event
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default On time Event

SetAlarm doesn't have to be running for this to work. It has to have been
run one time to set the event.

Sub SetAlarm()
Application.OnTime TimeValue("2:43:00 pm"), "DisplayAlarm"
End Sub

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

End Sub

worked fine for me.

If Excel had the focus the message pop'd up in the foreground

If Excel did not have the focus, the Excel icon on the taskbar turned blue
and pulsed. Activating excel revealed the message pop'd up.

Excel 2000, Windows 2000

--
Regards,
Tom Ogilvy

"pikus " wrote in message
...
In order for the application to check the time SetAlarm() has to be
running. If you start SetAlarm() you can have it WAIT until that time,
but that probably won't work for you. Search the newsgroup and you
should find several explanations of how to do exactly what you're
asking about. - Pikus


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