logo
search
VBA & Macro Problems

How to Fix Excel Crashing After a Macro Creates New Workbooks

Maira MehtabMaira Mehtab Sep 22, 2026 871 views

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 you start

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.

Solution 1Recommended

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.

1
Open Programs and Features

Press the Windows key, type 'Control Panel', and press Enter. Navigate to 'Programs' and select 'Programs and Features'.

2
Locate Microsoft Office

Scroll through the list of installed applications to find your version of Microsoft Office or Microsoft 365. Right-click it and select 'Change'.

3
Execute Online Repair

In the dialog box that appears, select 'Online Repair' (not Quick Repair) and click 'Repair'. Follow the on-screen instructions.

4
Restart and Test

Once the repair process finishes, restart your computer. Open Excel and run your macro again to see if the crashing persists.

Internet Connection Required: The Online Repair option requires a stable internet connection as it downloads fresh installation files from Microsoft servers.
Free Microsoft Office alternative

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. 1. Download WPS Office: Visit the official WPS website and download the free WPS Office installer.
  2. 2. Install the Software: Run the setup file and follow the clear on-screen instructions to complete the installation.
  3. 3. Open Your Spreadsheet: Launch WPS Spreadsheets and open your Excel workbook directly. You can immediately continue working with your existing data and layouts.
Seamless compatibility with Microsoft Excel formats including .xlsx, .xlsm, and .csv.Lightweight architecture ensures faster launch times and robust performance even with large datasets.Familiar, intuitive user interface ensuring zero learning curve for regular Excel users.Highly stable environment less prone to the legacy DLL conflicts that frequently cause application crashes.
microsoft office alternative - wps office

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.