0

I have a macro enabled Excel Sheet which is set to run certain code when it opens and then close itself when it is finished, the spreadsheet works perfectly and does it's code when opened and closes when finished.

However I'm trying to schedule it to open itself every day via windows task scheduler but I'm having trouble.

I've set up a basic task with the Actions as follows:

Program/script: "C:\Program Files (x86)\Microsoft Office\root\Office16\EXCEL.EXE"

Add arguments (optional): "C:\myexcel.xlsm"

This works ine with the option to "Run only when user is logged on" in the General tab is selected (I can Run it manually and it also triggers if I set the time for a minute from now or something) But obviously I don't want to be logged in all the time, as I want to set the macro to run overnight.

But if I change this optn to "Run whether user is logged on or not" then it doesn't work, I can't trigger manually, and I can't click on Run.

I found this page during my search, but it doesn't seem to answer my problem

Task scheduler cannot open batch file when set to run whether user is logged on or not

Has anyone encountered this before? Or have a suggestion as to how I can get this to work.

1 Answers1

0

This wont work if its not a Virtual Machine.

PerlBatch
  • 200
  • 2
  • 2
  • 10