VBA & Macro Problems

How to Fix Excel VBA UserForm Crashes Caused by FM20.DLL

Bushra ParveenBushra Parveen Nov 4, 2026 869 views

Question details

The user needs to resolve an issue where Excel unexpectedly crashes when executing a VBA macro that modifies a UserForm control caption.

How to Fix Excel VBA UserForm Crashes Caused by FM20.DLL
Product
Microsoft Excel
Device & OS
Windows
Scenario
Running or stepping through VBA code designed to change the text or caption of a UserForm label control.
Observed behavior
Excel crashes completely when the VBA code updates the UserForm control caption. The issue often persists even after saving and reopening, specifically pointing to FM20.DLL library issues or a corrupt workbook.
Before you start

Before attempting to re-register system libraries or migrate your VBA code, verify whether your Windows operating system is 32-bit or 64-bit, as this dictates the exact folder path needed to locate the FM20.DLL Microsoft Forms library.

Solution 1Recommended

Test the UserForm and Rebuild the Corrupt Workbook

Use this method to determine if the workbook itself is corrupted and migrate your data to a stable file.

When Excel crashes consistently on a specific line of VBA code, such as changing a label caption, the underlying workbook or its VBA project structure may be corrupt. Testing the exact code in a brand-new, clean file helps isolate whether the problem is global or restricted to that single file.

1
Create a new workbook

Open Excel and click on 'File' > 'New' > 'Blank workbook' to start a fresh file.

2
Open the VBA Editor

Press the ALT + F11 keys on your keyboard simultaneously to open the Microsoft Visual Basic for Applications window.

3
Insert a test UserForm

In the VBA Editor, click 'Insert' from the top menu and select 'UserForm'. Add a basic Label control from the Toolbox to the form.

4
Run the problematic code

Double-click the UserForm to open its code module. Enter the code that caused the crash (e.g., UserForm1.Label1.Caption = "Test") and press F5 to run it.

5
Rebuild the original file

If the code runs successfully in the new workbook without crashing, your original workbook is corrupt. You must rebuild your project by manually copying your spreadsheet data and pasting the VBA code into this new, uncorrupted workbook.

Test the UserForm and Rebuild the Corrupt Workbook
Do Not Move Corrupted Sheets Directly: When rebuilding your workbook, avoid using the 'Move or Copy' feature for entire worksheets, as this can transfer the corruption. Instead, copy only the cell data and recreate your macros manually.
Free Microsoft Office alternative

Try WPS Office for a Stable, Crash-Free Spreadsheet Experience

If Microsoft Excel continues to crash due to corrupted workbooks or library errors, consider switching to WPS Office. It provides a lightweight, highly compatible alternative to Microsoft Office, supporting all major Excel formats with a smooth, familiar user interface.

Fully compatible with Microsoft Excel formats, including .xls, .xlsx, and .xlsm files.Lightweight installation that runs smoothly without consuming excessive system resources or crashing.Includes an advanced Spreadsheet tool with familiar formulas, functions, and charting tools.Free to download and use, offering seamless migration from your existing Office suite.
microsoft office alternative - wps office

Frequently Asked Questions

Why does changing a UserForm label caption crash Excel?

This crash typically occurs when the workbook's VBA project has become permanently corrupted, or if there is a conflict or missing reference to the Microsoft Forms 2.0 Object Library (FM20.DLL) required to render UserForm controls.

Where is the FM20.DLL file located on my computer?

On 32-bit Windows systems, the FM20.DLL file is located in the C:\Windows\System32 folder. On 64-bit Windows systems, the system places 32-bit library files, including FM20.DLL, into the C:\Windows\SysWOW64 folder.

Can I repair a corrupted Excel workbook containing VBA macros?

While Excel has a built-in 'Open and Repair' feature, deeply corrupted VBA projects and user forms often cannot be fully salvaged. The most reliable long-term solution is to rebuild the workbook by copying your raw data and rewriting or pasting the VBA code into a completely new file.