Forum Discussion
Excel 365 removes VBA projects (vbaProject.bin) from all .xlsm files on Windows 11
Hello Microsoft Tech Community,
We are the technical support team at NEODIMO, a company that develops Excel-based financial management solutions using VBA.
We are investigating an unusual issue affecting one of our customers using Microsoft Excel 365 on Windows 11.
Problem description:
Whenever the customer opens a macro-enabled Excel workbook (.xlsm), Excel displays the following error:
"We found a problem with some content..."
When attempting to recover the workbook, Excel removes the entire VBA project.
The repair log reports:
Removed Part: /xl/vbaProject.bin (Visual Basic for Applications - VBA)
Troubleshooting already performed:
- The same workbooks open and function correctly on other computers.
- The issue persists when Excel is launched in Safe Mode (excel /safe).
- Even newly created .xlsm files containing simple VBA macros are affected.
- The VBA Editor opens normally using Alt + F11.
- Files have been downloaded again, including through Google Drive, without resolving the issue.
- Excel Trust Center and File Block settings have been reviewed.
- The customer reports using only Microsoft Defender.
- Standard .xlsx files work normally.
Additional observation:
Excel has also displayed a warning indicating that macro-enabled workbooks are blocked by Trust Center settings. Reviewing these settings has not resolved the issue.
Environment:
- Windows 11
- Microsoft 365 Apps for Enterprise
- Excel version/build: Pending confirmation
- Office architecture: Pending confirmation
- File storage location: Pending confirmation
- Security software: Microsoft Defender
Questions for the community:
- What could cause Excel to remove xl/vbaProject.bin from every macro-enabled workbook on a single computer?
- Could a Trust Center policy, Microsoft Defender security rule, or Office installation component cause this behavior?
- Are there specific logs, diagnostic tools, or repair procedures we should investigate?
- Has anyone experienced and successfully resolved a similar issue?
We have already contacted Microsoft Support, which recommended bringing this case to the Excel technical community.
Our priority is to resolve the underlying issue without disabling important security protections or compromising the customer's files.
Any technical guidance would be greatly appreciated.
Thank you!
NEODIMO Technical Support
1 Reply
- AndreasKillerCopper Contributor
Hi,
Answers to the questions:
- Many things, there might be a corrupted module, an invalid structure inside the bin...
- For this specific error as you described, IMHO a 100% no.
- Yes, export all modules on a machine that does not show the behaviour. Open the file on the machine that shows the error and let Excel repair the file. Check the references, maybe you can see an issue at that point. Import one module after the other and click Debug / Compile (it is mandatory and I assume that Option Explicit is a the top of every module). In many cases the error is gone after this procedure.
- Yes, I can read a bin file without Office at all and e.g. extract the code.
There is no general procedure to solve this issue, in some cases you have to rebuild the whole file. If you send me the download link to the file I can take a look.
Andreas.