Pinterest Pixel

Where To Store Your VBA Macro In? This Workbook or Personal Macro Workbook

John Michaloudis
A lot of Excel users get confused when they are recording an Excel Macro and they get prompted where they want to store their Excel Macro in?

A lot of Excel users get confused when they are recording an Excel Macro and they get prompted where they want to store their Excel Macro in?

Where To Store Your VBA Macro In? This Workbook or Personal Macro Workbook

Key Takeaways

  • Use “This Workbook” for Project-Specific Macros – Store macros in “This Workbook” when they’re only relevant to a single file or project.

  • Use the Personal Macro Workbook for Global Use – Macros saved in the Personal Macro Workbook are available across all your Excel workbooks.

  • Personal Macro Workbook is Hidden by Default – This special file opens in the background whenever Excel starts and doesn’t appear unless made visible.

  • Backup Your Personal Macro Workbook – Since it stores your reusable macros, make sure you regularly back it up to avoid losing your work.

  • Choose Based on Frequency and Reuse – Store frequently used macros in the Personal Macro Workbook and one-time use macros in “This Workbook”.

Where to Store Macro In?

You have 3 options:

* Personal Macro Workbook

* New Workbook

* This Workbook

During the initial setup of recording a macro a prompt will present itself asking where the macro should be stored.  This option ultimately determines not only where the macro will be saved, but also where you can access the macro and where it can be used.

 

This Workbook

The “THIS WORKBOOK” option will create a module within the active workbook where Excel will save the macro (VBA Code). By storing the macro in the active workbook, the macro can be used within the that workbook or if that workbook is open.

Since the macro is contained with the workbook it was created within, if the workbook is sent to another Excel user or placed on a network drive, the macro will be there as well and other users can use that macro when that workbook is open on their system.

Files that contain a macro or VBA code must be saved as a .XLSM (MACRO ENABLED WORKBOOK) or .XLSB file.

Some Common Uses:

  • Macros that are specific to a workbooks data
  • Macros that make data connections and refreshes of data contained with the workbook
  • Macros that clean up data specific to the workbook

Personal Macro Workbook

The PERSONAL MACRO WORKBOOK is a hidden workbook located on a machine that contains Microsoft Excel.

The workbook is always open, but, hidden from view by default.

If a macro is stored in the PERSONAL MACRO WORKBOOK, this macro can be used within any workbook on the computer that contains that personal macro workbook.

Macros stored in a personal macro workbook are not typically shared through normal exchange of Excel files. To share a macro contained within the personal workbook, one would need to explicitly share their personal macro workbook, export the module that contains the macro or copy the code to another file and send that new file.

Some Common Uses:

  • One-time setup macros that can be used on multiple workbooks
  • Macros that are more specific to an individual job that isn’t shared among others
  • Repetitive tasks necessary across multiple Excel files

New Workbook

A NEW WORKBOOK creates a brand new workbook at time of recording. This new workbook will contain the macro and all of the VBA code.

In order to use these macros you must open the new workbook that Excel created.

Not as common as the other two!

Frequently Asked Questions

What is the Personal Macro Workbook in Excel?
It’s a hidden workbook that opens automatically and stores macros you want to use across all Excel files.

How do I decide where to store a macro?
If the macro is specific to one file, use “This Workbook.” If it’s something you’ll reuse in other files, use the Personal Macro Workbook.

Where is the Personal Macro Workbook saved?
It’s typically saved in Excel’s startup folder under the name PERSONAL.XLSB.

Can I share macros from my Personal Macro Workbook?
Not directly. You would need to export the macro and import it into another user’s workbook or Personal Macro Workbook.

How do I make the Personal Macro Workbook visible?
Go to the View tab and click Unhide, then select PERSONAL.XLSB from the list.

If you like this Excel tip, please share it


Founder & Chief Inspirational Officer

at

John Michaloudis is a former accountant and finance analyst at General Electric, a Microsoft MVP since 2020, an Amazon #1 bestselling author of 4 Microsoft Excel books and teacher of Microsoft Excel & Office over at his flagship MyExcelOnline Academy Online Course.

See also  2 Easy Hacks to Convert XML to Excel

Steps To Follow

Star 30 Days - Full Access Star

One Dollar Trial

$1 Trial for 30 days!

Access for $1

Cancel Anytime

One Dollar Trial
  • Get FULL ACCESS to all our Excel & Office courses, bonuses, and support for just USD $1 today! Enjoy 30 days of learning and expert help.
  • You can CANCEL ANYTIME — no strings attached! Even if it’s on day 29, you won’t be charged again.
  • You'll get to keep all our downloadable Excel E-Books, Workbooks, Templates, and Cheat Sheets - yours to enjoy FOREVER!
  • Practice Workbooks
  • Certificates of Completion
  • 5 Amazing Bonuses
Satisfaction Guaranteed
Accepted paymend methods
Secure checkout

Get Video Training

Advance your Microsoft Excel & Office Skills with the MyExcelOnline Academy!

Dramatically Reduce Repetition, Stress, and Overtime!
Exponentially Increase Your Chances of a Promotion, Pay Raise or New Job!

Learn in as little as 5 minutes a day or on your schedule.

Learn More!

Share to...