VBA & Macro Problems

Fix Excel VBA UserForm Freezing with ShowModal False

John WilsonJohn Wilson Nov 11, 2026 868 views

Question details

The user's Excel VBA UserForm freezes or becomes unresponsive when the ShowModal property is set to False.

How to Fix Excel VBA UserForm Freezing with ShowModal False
Product
Excel
Device & OS
not provided
Scenario
Running a modeless UserForm containing RefEdit controls or complex event routines in Excel VBA.
Observed behavior
The UserForm freezes, crashes, or exhibits unreliable behavior when interacting with the controls or triggering command button events.
Before you start

Open the VBA Editor (Alt + F11) and ensure the affected UserForm is completely closed and not currently executing in the background before attempting to modify its properties or control code.

Solution 1Recommended

Change the UserForm to Modal or Replace RefEdit Controls

RefEdit controls are known to be unreliable on modeless forms. The best approach is to either make the form modal or replace the RefEdit controls with standard TextBoxes.

RefEdit controls are specifically designed to be used on modal dialog boxes. When placed on a modeless form (where the ShowModal property is False), they often cause the UserForm or the entire Excel application to freeze or crash due to focus conflicts.

1
Open the VBA Editor

Press Alt + F11 in Excel to open the Visual Basic for Applications Editor.

2
Select the UserForm

In the Project Explorer pane on the left, find and select the UserForm that is causing the freezing issue.

3
Modify the ShowModal Property

In the Properties window (press F4 if it is not visible), locate the 'ShowModal' property and change its value from False to True.

4
Remove the RefEdit Control (Alternative)

If you absolutely must use a modeless form, delete the RefEdit control from the UserForm and replace it with a standard TextBox control.

Change the UserForm to Modal or Replace RefEdit Controls
Alternative Range Selection: If you replace the RefEdit with a TextBox, you can use the Application.InputBox method with Type:=8 in your VBA code to reliably prompt users to select worksheet ranges.
Free Microsoft Office alternative

Try WPS Office for Seamless Excel Compatibility

If you frequently encounter limitations or bugs with native Microsoft Office controls like RefEdit, consider trying WPS Office. It is a free, lightweight, and highly compatible alternative that smoothly handles complex spreadsheets and macros.

Free to download with a lightweight installationExcellent compatibility with Microsoft Excel formats (.xlsx, .xls, .xlsm)Familiar user interface that requires zero learning curveBuilt-in support for complex formulas, data processing, and advanced spreadsheets
microsoft office alternative - wps office

Frequently Asked Questions

What is a modeless UserForm in Excel VBA?

Setting a UserForm's ShowModal property to False creates a modeless form. This allows the user to click away from the UserForm to interact with the Excel worksheet and other windows while the form remains open and visible on the screen.

Why does the RefEdit control cause Excel to freeze?

RefEdit controls are highly unstable when used outside of modal UserForms. Because a modeless form shares focus with the underlying worksheet, interacting with a RefEdit control can create an infinite loop of focus events, leading to a freeze or crash.

How can I select a cell range without using a RefEdit control?

You can use the Application.InputBox function with the Type parameter set to 8. This triggers a native Excel prompt that allows users to securely select a range with their mouse, and you can output the selected address to a standard TextBox on your UserForm.