Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
OnTime events
I am having trouble getting an Application.OnTime event to work. I a
typing in the code correctly, but when the time comes around, nothin happens. I am using a test example from a VBA guide book, so I know th code is written correctly. I just don't know why nothing happens. Ca anyone help me -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
OnTime events
It would be helpful if you posted the code you are using.
-- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "bambam77 " wrote in message ... I am having trouble getting an Application.OnTime event to work. I am typing in the code correctly, but when the time comes around, nothing happens. I am using a test example from a VBA guide book, so I know the code is written correctly. I just don't know why nothing happens. Can anyone help me. --- Message posted from http://www.ExcelForum.com/ |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
OnTime events
OOps Sorry
Sub SetAlarm() Application.OnTime 0.625, "DisplayAlarm" End Sub Sub DisplayAlarm() Beep MsgBox "Wake up. It's time for break!" End Sub -- Message posted from http://www.ExcelForum.com |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
OnTime events
dir you run the subroutine SetAlarm?
You ran it and nothing happened at 3 PM. You can test with a command like Application.OnTime now + TimeValue("00:00:15"), "DisplayAlarm" to have it run in 15 seconds. -- Regards, Tmo Ogilvy "bambam77 " wrote in message ... OOps Sorry Sub SetAlarm() Application.OnTime 0.625, "DisplayAlarm" End Sub Sub DisplayAlarm() Beep MsgBox "Wake up. It's time for break!" End Sub. --- Message posted from http://www.ExcelForum.com/ |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
OnTime events
Ys, I ran the SetAlarm routine and nothing happened. i will try the code
you gave to try a test. Thanks --- Message posted from http://www.ExcelForum.com/ |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
OnTime events
Maybe I didn't run the Macro. I thought I didn't need to assign it to
button or anything to make it work. I thought it just work automatically let me know if I'm wrong -- Message posted from http://www.ExcelForum.com |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
OnTime events
You have to explicitly run the macro that schedules ontime to run. Ontime
then runs the scheduled macro at the scheduled time. See Chip Pearson's page on this http://www.cpearson.com/excel/ontime.htm -- Regards, Tom Ogilvy "bambam77 " wrote in message ... Maybe I didn't run the Macro. I thought I didn't need to assign it to a button or anything to make it work. I thought it just works automatically let me know if I'm wrong. --- Message posted from http://www.ExcelForum.com/ |
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
OnTime events
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Find %ontime & SUMIF ontime ie: find matching sets within Range... | Excel Worksheet Functions | |||
.ontime | Excel Discussion (Misc queries) | |||
OnTime VB | Excel Discussion (Misc queries) | |||
OnTime VB | Excel Worksheet Functions | |||
OnTime...Please Help | Excel Programming |