Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
R R is offline
external usenet poster
 
Posts: 6
Default Help with OnTIme Event Issue

I am learning VBA using John Walkenbach's great book. I am also
frantically trying to make my project work! I need to build my Macro
so it runs every two minutes (on the minute mark) as long as the
workbook is open. I see in Walkenbach's example that I can use the
"OnTime Event" ---

Sub SetAlarm()
Application.OnTIme 0.625, "DisplayAlarm"
End Sub

Sub DisplayAlarm()
Beep
MsgBOx "Wake Up. Its time for an afternoon break"
End Sub


If I want to modify this example so DisplayAlarm beeps and gives the
mssg box every two minutes on the even second, how would I do that?

Thanks for your insights!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Help with OnTIme Event Issue

See www.cpearson.com/excel/ontime.htm for details and example
code.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"R" wrote in message
...
I am learning VBA using John Walkenbach's great book. I am also
frantically trying to make my project work! I need to build my
Macro
so it runs every two minutes (on the minute mark) as long as
the
workbook is open. I see in Walkenbach's example that I can use
the
"OnTime Event" ---

Sub SetAlarm()
Application.OnTIme 0.625, "DisplayAlarm"
End Sub

Sub DisplayAlarm()
Beep
MsgBOx "Wake Up. Its time for an afternoon break"
End Sub


If I want to modify this example so DisplayAlarm beeps and
gives the
mssg box every two minutes on the even second, how would I do
that?

Thanks for your insights!



Reply
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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Find %ontime & SUMIF ontime ie: find matching sets within Range... Chris T-M Excel Worksheet Functions 3 October 10th 08 08:14 PM
Ontime event cmcfalls[_5_] Excel Programming 4 May 22nd 04 05:17 PM
How does msgbox stop the OnTime event? Emile van Mierlo Excel Programming 12 May 4th 04 01:10 PM
OnTime event not firing in Workbook_Open event procedure GingerTommy Excel Programming 0 September 24th 03 03:18 PM
user event driven macro issue Jean-Paul Viel Excel Programming 0 September 18th 03 05:32 PM


All times are GMT +1. The time now is 12:08 AM.

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"