logo
search
VBA & Macro Problems

How to Fix Removed Part xl/vbaProject.bin Error in Excel

Muhammad TalhaMuhammad Talha Sep 29, 2026 873 views

Question details

The user encounters an error indicating that the embedded VBA project or macros have been removed from their Excel workbook.

How to Fix Removed Part xl/vbaProject.bin in an Excel Workbook
Product
Microsoft Excel
Device & OS
not provided
Scenario
Opening or saving an Excel workbook that previously contained VBA macros.
Observed behavior
An error message displays 'Removed part: /xl/vbaProject.bin', and all VBA macros are missing from the spreadsheet.
Before you start

Before proceeding, locate any previous backups or original versions of your workbook, as VBA code that has already been stripped from the current file cannot be magically restored without a backup.

Solution 1Recommended

Recover from Backup and Save as .xlsm

Since the VBA project is already deleted from the current file, you must restore it from a backup and ensure it is saved in a macro-enabled format.

The most common cause of this error is saving a macro-enabled workbook as a standard .xlsx file. The .xlsx format cannot store VBA code, so Excel automatically strips the vbaProject.bin component during the save process.

1
Locate a backup

Open the original or backup copy of the Excel file that still contains your macros.

2
Open the Save As menu

Click on 'File' in the top-left corner of the Excel window and select 'Save As'.

3
Change the file format

Choose your destination folder. In the 'Save as type' dropdown menu, select 'Excel Macro-Enabled Workbook (*.xlsm)'.

4
Save the file

Click 'Save' to securely store the file without losing your VBA project.

Recover from Backup and Save as .xlsm
Always use .xlsm for Macros: To prevent this issue in the future, always verify that the 'Save as type' is set to .xlsm whenever you are working with VBA macros.

Safely Manage Macro-Enabled Workbooks with WPS Office

WPS Spreadsheet natively supports Microsoft Excel formats, including full compatibility for viewing, editing, and saving VBA macros. Use WPS Office to confidently manage your .xlsm files without unexpected data loss.

  1. 1. Launch WPS Spreadsheet: Open WPS Office and select the 'Spreadsheet' module.
  2. 2. Open your macro workbook: Click 'Open' to browse and open your backup file containing the VBA macros.
  3. 3. Save in the correct format: Go to 'Menu' > 'Save As' and choose 'Microsoft Excel Macro-Enabled Workbook (*.xlsm)' from the format dropdown.
  4. 4. Confirm and save: Click 'Save' to securely preserve all your data and embedded VBA scripts.
Fully compatible with Microsoft Excel .xlsx and .xlsm formatsBuilt-in VBA environment to run and modify macros securelyLightweight application with a familiar, user-friendly interface
microsoft office alternative - wps office

Frequently Asked Questions

Why did my Excel macros suddenly disappear?

Macros typically disappear if a macro-enabled workbook is accidentally saved as a standard Excel Workbook (.xlsx), which is a format that structurally cannot store VBA code. They can also be stripped if the file is edited in web-based spreadsheet applications that lack VBA support.

Can I recover the vbaProject.bin file from my corrupted .xlsx file?

No. Once a workbook containing macros is saved as .xlsx and closed, the vbaProject.bin (the VBA code) is permanently deleted from the file structure. You must recover your macros from an older .xlsm backup or the original file.

Does Excel for the Web support VBA macros?

Excel for the Web allows you to open and view macro-enabled workbooks, but it does not support running, editing, or managing VBA macros. Making structural changes in the web editor can sometimes lead to macro corruption or removal.

How do I prevent Windows from blocking my macros?

Windows often blocks macros in files downloaded from the internet. To prevent this, right-click the downloaded file, select 'Properties', check the 'Unblock' box at the bottom of the General tab, and click 'OK' before opening it in Excel.