search
HomeTopicsexcelExcel Personal Macro Workbook: how to create, use and share

This tutorial explains how to create and utilize the Personal.xlsb file to make Excel macros accessible across all workbooks. Normally, Excel macros are workbook-specific. This guide demonstrates how to centralize commonly used VBA code in the Personal Macro Workbook for universal access within Excel.

  • Locating your Personal.xlsb file
  • Creating a Personal Macro Workbook
  • Editing the Personal Workbook
  • Running macros from the Personal Workbook
  • Exporting your Personal Macro Workbook
  • Sharing your Personal Macro Workbook
  • Enabling the Personal Macro Workbook
  • Preventing Personal.xlsb from automatically opening
  • Unhiding the Personal Workbook
  • Deleting the Personal.xlsb file

Understanding the Excel Personal Macro Workbook

The Personal Macro Workbook is a special file, Personal.xlsb (Excel 2007-2019) or Personal.xls (earlier versions). Macros within this file are available whenever Excel is launched. It's cleverly hidden by default, seamlessly integrating into the background. Excel automatically detects its location and loads it on startup. Beyond macros, it can also store custom VBA functions.

Note that the Personal Macro Workbook isn't created automatically. You must record at least one macro to generate it. Once created, you can add more macros via the VB Editor.

Locating the Personal Macro Workbook

The Personal.xlsb file resides in the XLSTART folder:

Windows 10, 7, Vista: C:\Users\User Name\AppData\Roaming\Microsoft\Excel\XLSTART

Windows XP: C:\Documents and Settings\User Name\Application Data\Microsoft\Excel\XLSTART\

Remember that the AppData folder is hidden. Enable "Hidden items" in the View tab of Windows Explorer to locate it.

Excel Personal Macro Workbook: how to create, use and share

The absence of the XLSTART folder indicates that the Personal Macro Workbook hasn't been created yet. Follow the steps below to create one.

Creating the Personal Macro Workbook

Creating the Personal Macro Workbook requires recording a macro, accessible through the Developer tab. Ensure the Developer tab is enabled in Excel.

  1. In any workbook, navigate to the Developer tab > Code group, and click Record Macro. Excel Personal Macro Workbook: how to create, use and share
  2. The Record Macro dialog appears. Select Personal Macro Workbook from the "Store Macro in" dropdown and click OK. You can optionally rename the default macro name (e.g., Macro1). Excel Personal Macro Workbook: how to create, use and share
  3. Perform the desired actions to record a macro (or skip this step if your sole aim is creating the workbook).
  4. Click Stop Recording (on the Developer tab or Status bar). Excel Personal Macro Workbook: how to create, use and share
  5. Save and close all open workbooks. A prompt will appear to save changes to the Personal Macro Workbook; click Save. Excel Personal Macro Workbook: how to create, use and share This prompt will reappear whenever you create or update macros.

The Personal.xlsb file is now created and will automatically load in the background with each Excel launch. You can add macros via recording, the VB Editor, copying from other workbooks, or importing from .bas files.

Managing Macros in the Personal Macro Workbook

Access, create, and edit macros within the Personal.xlsb file using the Visual Basic Editor (VBE). You can also copy code from other workbooks.

  1. Open the VBE (ALT F11 or the Visual Basic button on the Developer tab).
  2. In the Project Explorer, locate PERSONAL.XLSB, expand it, and double-click Module1 to open its code window.
  3. Write, paste, or edit VBA code.
  4. Close the VBE and Excel; save changes when prompted.

Excel Personal Macro Workbook: how to create, use and share

Using Macros from the Personal Workbook

Access macros from the Personal Workbook in any Excel file:

  1. Developer tab > Code group > Macros (or Alt F8).
  2. Select the desired macro and click Run. Excel Personal Macro Workbook: how to create, use and share

Alternatively, assign custom shortcuts or create macro buttons.

Exporting and Sharing the Personal Macro Workbook

Exporting:

  1. Open the VBE.
  2. Right-click Module1 under PERSONAL.XLSB and select Export File.
  3. Save the .bas file.

Excel Personal Macro Workbook: how to create, use and share

Importing: Right-click the module and select Import File.

Sharing: Share the Personal.xlsb file directly (use caution if recipients already have their own Personal.xlsb), copy individual macros to another workbook, or export macros to a .bas file for others to import. Be aware that some macros might not function correctly on other systems due to workbook-specific references.

Enabling the Personal Macro Workbook

If macros disappear, the Personal.xlsb file might be disabled. Re-enable it:

  1. File > Options.
  2. Select Add-ins.
  3. In the "Manage" dropdown, choose Disabled Items and click Go.
  4. Select Personal Macro Workbook, click Enable, and restart Excel.

Excel Personal Macro Workbook: how to create, use and share

Hiding and Unhiding the Personal Workbook

Hiding: To prevent the Personal.xlsb file from being visible while retaining macro functionality:

  1. Navigate to the PERSONAL.XLSB workbook.
  2. View tab > Window group > Hide. Excel Personal Macro Workbook: how to create, use and share

Unhiding:

  1. View tab > Window group > Unhide.
  2. Select PERSONAL.XLSB and click OK. Excel Personal Macro Workbook: how to create, use and share

Removing the Personal.xlsb File

To completely remove the Personal Macro Workbook:

  1. Close all Excel workbooks.
  2. Open Windows Explorer, show hidden items, navigate to the XLSTART folder, and delete PERSONAL.XLSB. Ensure all Excel processes are closed before deleting.

Excel Personal Macro Workbook: how to create, use and share

This concludes the guide on making Excel macros accessible across all workbooks.

The above is the detailed content of Excel Personal Macro Workbook: how to create, use and share. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
MEDIAN formula in Excel - practical examplesMEDIAN formula in Excel - practical examplesApr 11, 2025 pm 12:08 PM

This tutorial explains how to calculate the median of numerical data in Excel using the MEDIAN function. The median, a key measure of central tendency, identifies the middle value in a dataset, offering a more robust representation of central tenden

Google Spreadsheet COUNTIF function with formula examplesGoogle Spreadsheet COUNTIF function with formula examplesApr 11, 2025 pm 12:03 PM

Master Google Sheets COUNTIF: A Comprehensive Guide This guide explores the versatile COUNTIF function in Google Sheets, demonstrating its applications beyond simple cell counting. We'll cover various scenarios, from exact and partial matches to han

Excel shared workbook: How to share Excel file for multiple usersExcel shared workbook: How to share Excel file for multiple usersApr 11, 2025 am 11:58 AM

This tutorial provides a comprehensive guide to sharing Excel workbooks, covering various methods, access control, and conflict resolution. Modern Excel versions (2010, 2013, 2016, and later) simplify collaborative editing, eliminating the need to m

How to convert Excel to JPG - save .xls or .xlsx as image fileHow to convert Excel to JPG - save .xls or .xlsx as image fileApr 11, 2025 am 11:31 AM

This tutorial explores various methods for converting .xls files to .jpg images, encompassing both built-in Windows tools and free online converters. Need to create a presentation, share spreadsheet data securely, or design a document? Converting yo

Excel names and named ranges: how to define and use in formulasExcel names and named ranges: how to define and use in formulasApr 11, 2025 am 11:13 AM

This tutorial clarifies the function of Excel names and demonstrates how to define names for cells, ranges, constants, or formulas. It also covers editing, filtering, and deleting defined names. Excel names, while incredibly useful, are often overlo

Standard deviation Excel: functions and formula examplesStandard deviation Excel: functions and formula examplesApr 11, 2025 am 11:01 AM

This tutorial clarifies the distinction between standard deviation and standard error of the mean, guiding you on the optimal Excel functions for standard deviation calculations. In descriptive statistics, the mean and standard deviation are intrinsi

Square root in Excel: SQRT function and other waysSquare root in Excel: SQRT function and other waysApr 11, 2025 am 10:34 AM

This Excel tutorial demonstrates how to calculate square roots and nth roots. Finding the square root is a common mathematical operation, and Excel offers several methods. Methods for Calculating Square Roots in Excel: Using the SQRT Function: The

Google Sheets basics: Learn how to work with Google SpreadsheetsGoogle Sheets basics: Learn how to work with Google SpreadsheetsApr 11, 2025 am 10:23 AM

Unlock the Power of Google Sheets: A Beginner's Guide This tutorial introduces the fundamentals of Google Sheets, a powerful and versatile alternative to MS Excel. Learn how to effortlessly manage spreadsheets, leverage key features, and collaborate

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment