Application.OnTime TimeValue

Olyn01

New Member
Joined
Mar 12, 2019
Messages
12
Hi everyone. I have this command "Application.OnTime TimeValue" on my workbook while it is open. I just like to know if that command will continue it's assigned task based on the time given on everyday basis or just the day that the workbook is open? Thanks

Code:
Application.OnTime TimeValue("09:00:30"), "RecordData"
Application.OnTime TimeValue("00:02:00"), "SaveThis"
Application.OnTime TimeValue("23:59:15"), "Copy_Fix"
Application.OnTime TimeValue("23:59:30"), "Copy_Fix_2"
Application.OnTime TimeValue("23:59:45"), "SaveAs"
Application.OnTime TimeValue("23:59:55"), "ClearCellsData"
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
Unless you have a specific event macro like Workbook_BeforeClose that sets the Schedule argument of the OnTime Method to false, once started the OnTime procedure will run daily.
 
Upvote 0
Unless you have a specific event macro like Workbook_BeforeClose that sets the Schedule argument of the OnTime Method to false, once started the OnTime procedure will run daily.

That is what I knew before, but suddenly the code only works for a day then it won't the next day. I was actually talking about the Application.OnTime TimeValue("23:59:45"), "SaveAs". Before, I can leave the file open and let the codes to work, but suddenly I don't know what happen It requires reopening the file to make it work that day. Btw, Thank you for answering.
 
Upvote 0
It will only be scheduled once unless the called routines reschedule themselves.
 
Upvote 0

Forum statistics

Threads
1,220,965
Messages
6,157,119
Members
451,398
Latest member
rjsteward

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