Link to home
Start Free TrialLog in
Avatar of Bob3975
Bob3975Flag for United States of America

asked on

Open an Excel Workbook with Windows Scheduler

My Excel file has Auto_Open() ready to fire as soon as the workbook is opened.  How can I open the file each morning at 6:00 A.M?  Assuming the file is c:\users\bob\myfiles\x.xlsm, what exactly must I do to open that file with scheduler?
Avatar of Joe Winograd
Joe Winograd
Flag of United States of America image

Hi Bob,

Here are the steps:

Programs>Accessories>System Tools>Task Scheduler

Right-click Task Scheduler Library

Create Basic Task - go through the Wizard as follows

Enter a Name and Description for the task

Daily

Start time of 6:00am

Recurs every 1 days

Start a program

Click Browse and navigate to [c:\users\bob\myfiles\x.xlsm]

Click Finish

That should do it! Regards, Joe
ASKER CERTIFIED SOLUTION
Avatar of teomcam
teomcam

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
FYI, the batch file approach is not needed (it works, of course, but is not necessary). You may simply navigate directly to the Excel file and enter it in Task Scheduler, as I showed above. Regards, Joe
Avatar of Bob3975

ASKER

Joe, I tried it but couldn't get it to work for whatever reason.
Hmmm, I don't understand that. I'm sure that Excel is associated with the file type [.xlsm]. I just went through the steps I posted and it worked perfectly. I'm very curious to understand why it didn't work for you. What happens if you follow my steps and then click "Run" in the Task Scheduler to run it immediately? Does it fail? If so, how? Thanks, Joe
Avatar of Bob3975

ASKER

The steps you posted are identical to  social.technet.microsoft.com/Forums/en-US/w7itprogeneral/thread/ce659a72-88e1-448b-8b45-ff2cb4ba9da8/ which is what I tried over the span of several hours before giving up and posting for help.  In both the case of the batch and your solution I set the timer for about a minute in the future making sure that time had not yet occurred when submitted.  The batch worked every time but I never got the other to even make a peep.  xlsm is associated with Excel as double clicking the file does bring it up.  I've no idea why but rather than digging through it all I just decided to ask for help.
I'm not familiar with the [social.technet.microsoft.com] link that you posted. I simply went over the steps that I've used for all of my scheduled tasks and recorded the steps for you. I did it on a test xlsx (not xlsm, but it shouldn't matter since Excel owns xlsm) and it worked perfectly...as it does on all of my production scheduled tasks. I don't have a clue why it's not working for you...and I always like to understand why things don't work, but I guess this one will go down as one of life's mysteries. :)

Btw, it seems that the steps that are working for you are identical to the steps I posted, except that the target in mine is the xlsm file and the target in the other one is the batch file. This, of course, should not make a difference in terms of the Task Scheduler running it. Anyway, thanks for your responses...interesting stuff...I'm glad that the batch file approach is working for you. Regards, Joe