Forum Discussion

JoHoGH's avatar
JoHoGH
Copper Contributor
Apr 29, 2026

Closing VBA module is crashing excel

If I open a macro enabled workbook, go to developer>visual basic and try closing any VBA module windows, excel closes. If I then start excel, open a blank workbook, go to developer> visual basics and insert several blank modules, and then close one, excel closes. If I reboot my PC, open a blank workbook, go to visual basic and insert modules, now I can close them ok. But once I open an existing macro enabled workbook the problem starts over again.

Weirdly, if I start from scratch, open a new workbook, then developer and insert just one module and then delete it, that's ok. I can do that repeatedly.

Opening and closing form windows in the developer doesn't show the same problem.

It isn't just one particular macro enabled workbook that is triggering the problem. Sometimes the workbook opens without macros enabled and I close it without enabling macros and the problem has been triggered.

I have switched off all addins. I did recently activate the Inquire COM addin.

My excel version is MS Excel for.365 MSO (Version 2604 Build 16.0.19929.20096) 64-bit running on Windows 11. I don't know when I first saw this but I think within the last month. It's a company laptop with phone IT admin support so I'm limited on the trouble shooting I can do myself. Office 365 has been uninstalled and reinstalled but did not help. Other users in my organisation are not seeing the same issue when they open the same workbooks. The IT admin however told me they did see the issue.

Updated.

Starting from a clean state after reboot, I open a new workbook, add several blank VBA modules then save as xlsm and close. Then when I open a new workbook the problem is triggered again. No VBA code has been run or written.

Updated

If I maximise the VBA module windows before closing them then I can close them without crashing!

 

 

No RepliesBe the first to reply