Excel VBA Tip: How to Automatically Open a Workbook When You Launch Excel

Untitled Document

Excel 2013 and 2010.

Is there a workbook you use frequently? Would you like to open it automatically when you launch Excel? The process is simple – place it in your XLSTART folder.

excel vba tip open files automatically in excel

What is the XLSTART folder?

The XLSTART folder is created when you install Excel. XLSTART not only houses the workbook template, Book.xltx, but any workbook you place in this folder will automatically open each time you launch Excel.

Here’s the rub.

You may not know where the XLSTART folder is, since its location depends on your version of Excel and your operating system.

Here’s an easy way to find it. Yes, Visual Basic for Applications (VBA) is involved, but it’s easy!

Step 1 – Launch a New File

If you already have the file you want to save to your XLSTART folder open, create a new file. (Shortcut Key: CTRL N). For this exercise, it’s best to start with a blank canvas.

Step 2 – Open the Visual Basic Editor (VBE)

Use the shortcut key ALT F11.

Step 3 – Open the Immediate Window

What is the immediate window? The immediate window is a special area used for debugging code. You can also type snippets of code in the immediate window and immediately view your results.

Use the shortcut key CTRL G, which opens the immediate window towards the bottom of your screen.

Step 4 – Type This Code in the Immediate Window

Type ?application.StartupPath in the immediate window and hit the Enter key.

The location of your immediate window shows up on your screen. Copy it to your clipboard (CTRL C).

Step 5 – Save the File.

Switch to the workbook you want to save to your XLSTART folder (Shortcut: CTRL TAB). Click File SaveAs (Shortcut: F12).  Paste (CTRL V) the location of your startup folder next to File Name, and press the Enter key. This will point you to the XLSTART folder. Save your file.


About the Author

Jackie Kiadii is an Information Technology professional with a degree in Computer Information Systems. She learned to program with Visual Basic over 20 years ago, and has developed the following Advanced-level Excel courses: Painless Pivot Tables ™, and Jump Start Excel Macros/VBA™, and Excel’s Best Functions – from A to Z™. Her company also offers Excel 2007, 2010 and 2013: Certification Prep, Basic through Advanced,

Need onsite group training? Call 770.498.7333 or email us. Our courses can be customized to your needs. Jackie has provided software training for employees of The Coca-Cola Company, Emory University, Novelis, and more. This training is available for groups of 4 or more students.

Atlanta Computer Training on Facebook Atlanta Computer Training - LinkedIn Software Tips on Twitter

Click to Grab Your Excel Ebook – Free!

Get the free Excel ebook

12 Tips to Empower Excel Users

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>