Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Conditional macro execution

Is there a way I can fire a macro based on time of day?
i.e 08:10

Thanks in advance,
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 57
Default Conditional macro execution

Willis,

Look at Application.Ontime.

--
Earl Kiosterud
mvpearl omitthisword at verizon period net
-------------------------------------------

"Willis Marsh" wrote in message
...
Is there a way I can fire a macro based on time of day?
i.e 08:10

Thanks in advance,



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 117
Default Conditional macro execution

"Willis Marsh" wrote in message ...
Is there a way I can fire a macro based on time of day?
i.e 08:10

Thanks in advance,


Hi Willis... this was posted by Rob van Gelder it may be of some help...

seeya ste

Sub ScheduleMe()
Application.OnTime Now() + TimeValue("00:00:05"), "RunMe"
End Sub

Sub RunMe()
Beep
ScheduleMe
End Sub
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Conditional macro execution

The problem with this code is that there is no way to terminate
the loop. How would you ever stop RunMe from rescheduling itself
without terminating Excel? You should store the run time in a
public variable, and use the value of that variable in the OnTime
procedure. See www.cpearson.com/excel/ontime.htm for details.


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

"ste mac" wrote in message
om...
"Willis Marsh" wrote in message

...
Is there a way I can fire a macro based on time of day?
i.e 08:10

Thanks in advance,


Hi Willis... this was posted by Rob van Gelder it may be of

some help...

seeya ste

Sub ScheduleMe()
Application.OnTime Now() + TimeValue("00:00:05"), "RunMe"
End Sub

Sub RunMe()
Beep
ScheduleMe
End Sub



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Conditional macro execution


-----Original Message-----
The problem with this code is that there is no way to

terminate
the loop. How would you ever stop RunMe from rescheduling

itself
without terminating Excel? You should store the run time

in a
public variable, and use the value of that variable in

the OnTime
procedure. See www.cpearson.com/excel/ontime.htm for

details.


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

"ste mac" wrote in message
. com...
"Willis Marsh" wrote in message

.. .
Is there a way I can fire a macro based on time of

day?
i.e 08:10

Thanks in advance,


Hi Willis... this was posted by Rob van Gelder it may

be of
some help...

seeya ste

Sub ScheduleMe()
Application.OnTime Now() + TimeValue

("00:00:05"), "RunMe"
End Sub

Sub RunMe()
Beep
ScheduleMe
End Sub



.
Thanks for the help.

Sub ScheduleMe()
Application.OnTime TimeValue("08:10:00"), "SaveWorksheet
()"
End Sub
Works just fine
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
Macro Execution C Brandt Excel Discussion (Misc queries) 2 July 13th 07 07:23 AM
Macro Execution, Part Duo C Brandt Excel Discussion (Misc queries) 1 July 12th 07 10:57 PM
Triggering Macro Execution Peter M[_3_] Excel Programming 1 January 12th 04 08:20 PM
Restricting Macro Execution Bob Umlas[_3_] Excel Programming 2 December 3rd 03 04:29 PM
Restricting Macro Execution John Wilson Excel Programming 1 December 3rd 03 03:43 PM


All times are GMT +1. The time now is 11:55 PM.

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"