Thanks for reporting the issue. Since the file is macro-enabled, it may be affected by corrupted VBA code or broken external connections.
Please try the following:
Steps to Diagnose and Fix the Issue
- Inspect Macros for Errors
Go to Developer → Visual Basic.
Check for any broken or outdated VBA code.
If the workbook uses Excel Interop, ensure all COM objects are properly released. Lingering objects can cause exceptions when calling Excel.Quit().
- Check External Connections Navigate to Data → Queries & Connections. Look for broken links or failed data sources. If Power Query is used, ensure the external source is online and accessible. Excel will retain old data if it cannot refresh.
- Repair Excel Installation Reinstall or repair Microsoft 365 and Visual Studio if the issue persists. This has resolved similar problems for other users.
- Use Power BI or Alternative Tools If the workbook is too complex or slow, consider using Power BI for better performance and data handling.
Let me know if the issue persists after following these steps. I’ll be happy to assist further if needed. If the issue has been resolved, kindly mark the response as answered