Run procedure at time of day - windows task scheduler?

Noz2k

Well-known Member
Joined
Mar 15, 2011
Messages
693
So I have set up 2 procedures to be run on the workbook open event of a workbook, and then created a task in the windows task scheduler to open the workbook at a set time each day.

However I am experiencing 2 problems. 1 is in closing the workbook. Because the procedures won't run when the workbook is open, if on a weekend for instance the task is run on a Saturday morning, there is nobody around to then close the workbook, therefore the task will fail on the Sunday.

The other issue is that the task doesn't seem to run if excel is already open, even if it's a different file. This might cause a problem as on a weekday the task does not run at a time when people are unlikely to be using the computer, and they might have excel open.

Does anybody have any sort of solutions for this?

Thanks in advance
 
Last edited:

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
Actually in terms of the 2nd problem, it does actually open a new excel application, the problem there in though is that it then replicates the personal.xlsb file and wants user input to check that it's ok to open this in read only.
 
Upvote 0
Ok, so I've sorted out the first problem by using a workaround, and adding workbook.close and application.quit, once the procedures have finished.

Still have problems with the 2nd problem though, tried changing the properties of the file to be .readonly, but still get a prompt about the personal.xlsb already being open
 
Upvote 0

Forum statistics

Threads
1,225,608
Messages
6,185,960
Members
453,333
Latest member
BioCoder84

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