Auto Execution in Excel with Zero Manual Intervention


WINTER is coming !


Age of Automation is here to save you from all the Manual Work, after all winter is not meant to work. You worked enough in summers, but now it's time to hibernate.

Let's be part of this Rest Revolution, and witness the perks of it.


Being an Analyst, we have loads of Reports to work on an AD-HOC basis. Many of the these might be repetitive in nature and are often annoying when it comes on a Daily basis, even on "Weekends". There can be situations when you just need to wait for long for the sake of these Report(s) and there can also be cases when you're caught up with other deliverables as well. Since you can't run away from them, the only thing you can do, is, to deep dive and find the Pearl for your own Saviour.

Ever got a task assigned where you had to generate a report every day, even on weekends?

Let's see how to automate a work process in Excel that would Run a Macro after opening the File on its own at a Particular Time, Daily, and closes it after the Macro gets executed and you needn't bother about it.


Step - 1 : Creation of VB Script for opening the Excel File. 


Set objExcel = CreateObject("Excel.Application")
Set objWorkbook = 
objExcel.Workbooks.Open("C:\Users\Folder\Desktop\File_Automation\Automation.xlsm")
objExcel.Application.Quit
WScript.Echo "Finished."
WScript.Quit

**Code can always be modified based upon the need. 


This code must be written on a Notepad and saved with an extension of .vbs since it's a VB Script. On saving, a VB Script file gets created at the location. 


Step - 2



Once the Excel file opens, the Macro specified inside the Workbook must get executed.


For that, the Macro needs to be written inside This Workbook and under Private Sub Workbook_Open().
Then you design the Macro based upon the need / requirement but do make sure the Excel Macro Enabled File also gets Closed upon the execution of the Macro else you have to specify the same in the VB Script.


Step - 3


Well! Setting up the Task Scheduler was never so tough. But alas, I never had much to do with this section before.

Wondering What Next?

Simply open it from the START MENU, and then follow the work flow as given in the Picture below:

Click to enlarge

Not to worry, you can always add/modify your requirements any time.


Great Snakes..eh? Well, it definitely saved you from Boredom for sure!

#LongLiveAutomation




Enjoy reading our other articles and stay tuned with us.


Kindly do provide your feedback in the 'Comments' Section and share as much as possible.

No comments:

Post a Comment

Do provide us your feedback, it would help us serve your better.