How best to use Application.OnTime?

JeffGrant

Well-known Member
Joined
Apr 7, 2021
Messages
558
Office Version
  1. 365
Platform
  1. Windows
Hi All,

In my model, I have time critical macros to run.

There are four components, where the run time would be T=0, T= 2, T=5 & T=7 minutes.

With T=0 and T=7, I must run Application.OnTime because it involves download and uploading data to an API.

However, with T =2 & T= 5, I could just as easily achieve the result using the Application.Wait command inside a sub.

I don't know enough about the pitfalls of using Application.OnTime in bulk and how the memory is allocated/handled. I am literally scheduling anything up to 100 events give or take.


My question is: Am I better off to schedule everything with Application.OnTime or use a combination of Application.OnTime and Application.Wait?

Thanks for your help in advance.
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
IMO it would be simpler to have the called routine schedule itself again as necessary.
 
Upvote 0

Forum statistics

Threads
1,224,830
Messages
6,181,225
Members
453,025
Latest member
Hannah_Pham93

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