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
2 Replies
The strongest clue is that newly created macro workbooks fail on this one computer while the originals work elsewhere. That makes rebuilding each customer's workbook premature; an installation or machine-specific issue still needs investigation, even though Safe Mode also fails.
Keep untouched originals and save any repaired output separately. Record Excel's complete version, update channel and 32/64-bit architecture, then reproduce with a minimal workbook stored locally. Preserve its repair log and the exact Trust Center warning as separate evidence.
Microsoft documents internet-macro blocking as preventing macro execution. That warning alone does not explain why recovery removes vbaProject.bin, and it is not enough to attribute this to Defender. Check for a corresponding Defender detection rather than disabling protection.
With the files backed up, run Microsoft's Office Online Repair and retest that minimal workbook. If it persists, provide support the before/after files, repair log and installation details through a private upload.
- 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.