How to Fix Excel Crashing After a Macro Creates New Workbooks
Question details
The user is experiencing frequent Microsoft Excel crashes while running a VBA macro that generates new workbooks from a template, accompanied by specific Windows Event Viewer errors.
- Product
- Microsoft Excel
- Device & OS
- Windows
- Scenario
- Executing a repetitive VBA macro process to create multiple new workbooks using a predefined Excel template.
- Observed behavior
- Excel abruptly crashes after the macro runs several times. Recovered files frequently open in recovery mode, and Windows Event Viewer logs indicate FM20.dll and OFFICE_MODULE_VERSION_MISMATCH errors.
Before proceeding with troubleshooting, save a backup copy of your macro-enabled workbook (.xlsm) and the associated template file to a different directory to prevent accidental data loss during system repairs.
Run the Microsoft Office Online Repair Tool
Running an online repair can automatically fix corrupted DLL files and resolve the OFFICE_MODULE_VERSION_MISMATCH error causing the crash.
Module version mismatches often occur when Office components update improperly or become corrupted. The built-in Microsoft Office Online Repair tool checks your installation against the latest official files and replaces damaged components like FM20.dll.
Press the Windows key, type 'Control Panel', and press Enter. Navigate to 'Programs' and select 'Programs and Features'.
Scroll through the list of installed applications to find your version of Microsoft Office or Microsoft 365. Right-click it and select 'Change'.
In the dialog box that appears, select 'Online Repair' (not Quick Repair) and click 'Repair'. Follow the on-screen instructions.
Once the repair process finishes, restart your computer. Open Excel and run your macro again to see if the crashing persists.
Run System File Checker (SFC) for Windows
Using the Windows System File Checker can repair underlying operating system files that interact with Excel's macro environment.
Gather Error Logs and Request Specialized Support
If local repairs fail, collecting detailed crash logs allows experts on Microsoft Q&A to provide specialized VBA troubleshooting.
Experience Stable Spreadsheet Performance with WPS Office
If Microsoft Excel continues to crash due to module version mismatches or complex software conflicts, consider switching to WPS Office. It offers a lightweight, highly compatible spreadsheet environment that easily handles your complex data without the heavy legacy DLL errors.
- 1. Download WPS Office: Visit the official WPS website and download the free WPS Office installer.
- 2. Install the Software: Run the setup file and follow the clear on-screen instructions to complete the installation.
- 3. Open Your Spreadsheet: Launch WPS Spreadsheets and open your Excel workbook directly. You can immediately continue working with your existing data and layouts.

Frequently Asked Questions
Why does Excel crash when running macros that create new workbooks?
Excel may crash during repetitive macro executions due to memory leaks, unreleased COM objects in the VBA code, corrupt workbook templates, or deep module version mismatches within Office DLL files.
What is the FM20.dll error in Excel?
FM20.dll is a Microsoft Forms 2.0 component used primarily for UserForms and ActiveX controls. Errors involving this file usually indicate a version mismatch, corruption in the Office installation, or conflicts with 64-bit and 32-bit Office versions.
How do I view Excel crash logs in Windows?
You can view Excel crash logs by opening the Windows Event Viewer, navigating to Windows Logs > Application, and looking for 'Application Error' entries at the exact timestamp of the crash.




