How to Start a Macro When Opening an Excel Spreadsheet

by Matthew Burley

Microsoft Excel is the spreadsheet application included as part of the Microsoft Office suite of programs. This program is capable of analyzing and comparing data, as well as of running such operations as formulas, on data that has been entered into a spreadsheet. A Macro is a function or series of functions that can be used to quickly perform operations on a spreadsheet. Macros can save users a lot of time, specifically if they need to constantly perform the same tasks on a spreadsheet. A Macro can even be set to run on a spreadsheet as soon as it is opened.


Open the Excel file in which the Macro will be starting at open.


Click the "Tools" menu at the top of the screen, scroll to the "Macro" option, then choose the "Record New Macro" option.


Type "Auto_Open" in the "Macro Name" text field.


Select "This Workbook" from the drop-down menu under the "Store Macro in" wording, then click the "OK" button.


Create your Macro by performing the options that will be included each time the Macro is run.


Click the blue "Stop" button in the floating Macro toolbar once all the Macro options have been completed.


Click "File" at the top of the screen, then select the "Save As" option.


Save the file into the "XLStart" folder, which can be found at "C:\Program Files (x86)\Microsoft Office\OFFICE11\XLStart".


  • check To prevent the Macro from running when you open your spreadsheet, simply launch Excel first, then open the spreadsheet by clicking "File," then "Open."

About the Author

Matthew Burley has been a writer of online content since 2005. You can view many of his articles on Burley holds a Bachelor of Science in political science from Arizona State and a Master of Science in computer information systems from the University of Phoenix.

More Articles

Photo Credits

  • photo_camera number background image by kuhar from