ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   scheduling macros to run automatically (https://www.excelbanter.com/excel-programming/395043-scheduling-macros-run-automatically.html)

Robert

scheduling macros to run automatically
 
Dear all,

I have a quick question regarding macros. What is the best (and easiest)
way to have macros run automatically at prespecified times? Thanks.

[email protected]

scheduling macros to run automatically
 
I use Application.OnTime

Say you woould like to run MySub at 12:00

Sub Run()

Application.OnTime date + 12:00, "MySub"


End Sub

hth

Toy.


Tom Ogilvy

scheduling macros to run automatically
 
If you are talking about on a daily basis, then use the windows scheduler to
open a workbook at a certain time(s).

In the workbook_open event call your macros (in that workbook).

http://www.cpearson.com/excel/events.htm for an overview of events

if you just want to schedule a few things to happen when you already have
excel open you can look at:
http://www.cpearson.com/excel/ontime.htm

--
Regards,
Tom Ogilvy


"robert" wrote:

Dear all,

I have a quick question regarding macros. What is the best (and easiest)
way to have macros run automatically at prespecified times? Thanks.



All times are GMT +1. The time now is 12:43 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com