Application.OnTime Machine Operation Limits?

SBF12345

Well-known Member
Joined
Jul 26, 2014
Messages
614
Greetings,

I have a number of scraper like subs that I would like to automate. for this task I am using a number of subs to serve as the timing tool like the one below:
Code:
Sub YZ_ST19()

    RW19 = Now + TimeSerial(744, 0, 0)
    Application.OnTime EarliestTime:=RW19, Procedure:=RWCALL19, _
        Schedule:=True


End Sub

My question is whether or not I can turn my computer off and get the updates at the moment that I turn it back on? or would I need to have my machine running 24/7 to allow for the code to maintain the time counter. Any ideas?
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Application.Ontime will be cleared as soon as you close Excel down.
 
Upvote 0
Thanks RoryA,

Just to clarify, will I need to manually execute the code everytime I need to run it? or will it pickup the time criteria when it needs to run again?

Apparently the link to the website I used as the basis of my understanding of OnTime is no longer in operation. But I was under the impression that OnTime was for the purpose of allowing for the continuous function of subs requiring cyclical execution.
 
Upvote 0
It is but only with Excel open. You need to reset the schedule each time Excel is opened.
 
Upvote 0
Do you know if there are other methods to collect data over a regular interval using VBA?

I suppose I could write down the schedule and click a button once a day, week, month, etc.
 
Upvote 0

Forum statistics

Threads
1,223,896
Messages
6,175,260
Members
452,627
Latest member
KitkatToby

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top