logo
search
VBA & Macro Problems

How to Fix PERSONAL.XLSB Trust Center and Duplicate Workbook Errors in Excel

Olivia MillerOlivia Miller Sep 30, 2026 869 views

Question details

The user needs to resolve an issue where an Excel macro triggers security warnings and duplicate workbook errors.

How to Fix PERSONAL.XLSB Trust Center and Duplicate Workbook Errors in Excel
Product
Microsoft Excel
Device & OS
not provided
Scenario
Executing a macro assigned to a Quick Access Toolbar button on filtered, multi-area selections.
Observed behavior
Excel displays a Trust Center security warning and throws an error stating it cannot open two workbooks with the same name.
Before you start

Ensure you have saved all open workbooks and close any hidden instances of Excel in your Task Manager before making changes to your Quick Access Toolbar or VBA code.

Solution 1Recommended

Reset the Quick Access Toolbar and Update VBA Code

This solution resolves the duplicate workbook conflict by clearing corrupt toolbar cache and optimizing the macro to handle filtered selections properly.

When a macro assigned to the Quick Access Toolbar (QAT) becomes corrupted, it can cause Excel to attempt opening the PERSONAL.XLSB file twice, triggering the duplicate workbook error. Rebuilding the shortcut resolves this.

Additionally, modifying the VBA code to exclusively target visible cells ensures that the macro operates correctly when interacting with filtered, multi-area ranges.

1
Remove the broken macro button

Right-click the problematic macro button on your Quick Access Toolbar and select 'Remove from Quick Access Toolbar'.

2
Re-add the macro to the toolbar

Click the drop-down arrow at the end of the Quick Access Toolbar and select 'More Commands'. Under 'Choose commands from', select 'Macros', find your PERSONAL.XLSB macro, and click 'Add' to place it back on the toolbar.

3
Modify the macro code for filtered cells

Press Alt + F11 to open the VBA Editor. Locate your macro inside the PERSONAL.XLSB module and update the range references to use SpecialCells(xlCellTypeVisible). This ensures the code only processes visible values in multiple-area selections.

4
Save changes and restart Excel

Save your VBA project, close the VBA editor, and completely exit Excel. Reopen your workbook to confirm the Trust Center and duplicate workbook errors are resolved.

Reset the Quick Access Toolbar and Update VBA Code
Tip for Trusted Locations: If the Trust Center warning persists, ensure that your XLSTART folder (where PERSONAL.XLSB resides) is added to Excel's Trusted Locations via File > Options > Trust Center > Trust Center Settings > Trusted Locations.
Free Microsoft Office alternative

Experience Hassle-Free Spreadsheets with WPS Office

If you frequently deal with complex VBA macro issues, Trust Center warnings, or duplicate workbook errors in Microsoft Excel, WPS Office provides a lightweight and highly compatible alternative. It offers powerful spreadsheet tools and a seamless user experience without the heavy caching bugs.

  1. 1. Download WPS Office: Visit the official WPS website and download the free WPS Office installation package.
  2. 2. Install the software: Run the installer and follow the on-screen instructions to complete the lightweight installation.
  3. 3. Open your spreadsheets: Launch WPS Spreadsheets and open your existing Excel workbooks to enjoy a stable, error-free experience.
Fully compatible with Microsoft Excel formats, including .xlsx, .xlsm, and .xlsb files.Familiar tabbed interface that makes migrating from MS Office intuitive and quick.Built-in developer tools and robust support for executing your existing spreadsheet macros.Lightweight software architecture that minimizes freezing and duplicate file loading errors.
microsoft office alternative - wps office

Frequently Asked Questions

Why does Excel say it cannot open two workbooks with the same name?

This error occurs when Excel tries to load a file that is already open in the background. In the context of macros, a corrupted Quick Access Toolbar button can mistakenly trigger Excel to open the hidden PERSONAL.XLSB file a second time.

Where is the PERSONAL.XLSB file located on my computer?

The Personal Macro Workbook is typically located in your XLSTART folder. For Windows users, the default path is usually C:\Users\[YourUsername]\AppData\Roaming\Microsoft\Excel\XLSTART.

How do I fix Trust Center security warnings for my own macros?

You can resolve security warnings for your own macros by adding the folder containing your PERSONAL.XLSB file to your Trusted Locations. Navigate to File > Options > Trust Center > Trust Center Settings > Trusted Locations and add the XLSTART folder path.

How do I make a VBA macro process only visible cells in a filtered list?

To process only visible cells, you should apply the SpecialCells(xlCellTypeVisible) method to your range object in VBA. This ensures the macro ignores hidden rows and exclusively targets the filtered, multi-area selection.