Auto Open Excel with Windows Task Scheduler
Windows Task Scheduler allows you to trigger an event in Windows when specific criteria is met. In this tutorial, I will not detail what you can do with Task Scheduler (since there are too many features), instead I will focus on how you can auto open Excel with Windows Task Scheduler.
Since I am using Chinese Windows but I want to write this article in English, all the screenshots are copied from the below website.
http://www.sevenforums.com/tutorials/12444-task-scheduler-create-new-task.html
Windows Task Scheduler
Task: In the following example, our task is to run an Excel file everyday.
Step 1) Navigate to Windows Logo in the Menu > All Programs > Accessories > System Tools > Task Scheduler
Step 2) Click on “Create Basic Tasks” under “Actions” on the right menu.
Step 3) Enter a Name and Description for your task (optional). Lets say the task is called “My Task”, then click on the Next button.
Step 4) Select the frequency of your task. Select “Daily”.
Step 5) Select “Start a program”
Step 6) Select the Excel file your want to start
Step 7) Click “Finish” button to complete. You can afterward modify the task.
Run Macro automatically in Excel
Now the Excel will open everyday automatically, but opening it is not your ultimate goal, you may want to also run Macro whenever it opens.
1) Open the Excel, press ALT+11 to enter VBE (Visual Basic Editor)
2) Double click on ThisWorkbook > select Workbook > Select Open
3) Insert your code between Private Sub and End Sub. Now the code will automatically run whenever workbook is opened.
To know more about how to run Macro automatically, click here.