Office Apps Freezing

How to Fix Excel Ribbon Freezing When Unhiding Very Hidden Sheets

John WilsonJohn Wilson Oct 29, 2026 868 views

Question details

The user needs to resolve an issue where the Excel ribbon and application menus become entirely unresponsive after unhiding and re-hiding very hidden worksheets.

Fix Excel Ribbon Freezing When Unhiding Very Hidden Sheets
Product
Microsoft Excel 2013
Device & OS
not provided
Scenario
Using a switchboard or VBA macro to make very hidden worksheets visible, and then hiding them again via the Workbook_SheetDeactivate event.
Observed behavior
The Excel application ribbon and menus freeze and become unresponsive after the VBA event runs.
Before you start

Ensure you have saved a backup copy of your macro-enabled workbook before modifying your VBA code, as incorrect macro adjustments could lead to unhandled errors or data loss.

Solution 1Recommended

Implement a VBA Selection Workaround

Force Excel's user interface to refresh by temporarily cycling through sheet selections while application events and screen updating are disabled.

This freezing issue typically occurs due to an internal bug in older Excel versions where the UI fails to register the transition of the xlSheetVeryHidden property properly. By forcing a selection change under the hood, the ribbon state is forced to reset.

1
Open the VBA Editor

Press Alt + F11 on your keyboard to launch the Visual Basic for Applications (VBA) editor.

2
Locate the macro code

Find the specific module or the Workbook_SheetDeactivate event where your code hides and unhides the very hidden sheets.

3
Disable application updating

At the very beginning of the visibility toggle process, add the lines: Application.ScreenUpdating = False and Application.EnableEvents = False.

4
Cycle sheet selections

Add code to perform the following exact sequence: make the hidden sheet visible, select it (using .Select), activate a different sheet, and then select the hidden sheet one more time.

5
Restore standard settings

At the end of your macro sequence, restore Excel's normal behavior by adding: Application.ScreenUpdating = True and Application.EnableEvents = True.

Implement a VBA Selection Workaround
UI Refreshed: Cycling the active sheet forces Excel to rebuild the ribbon interface for the current view, successfully bypassing the freeze.
Free Microsoft Office alternative

Experience Stable Macro Execution with WPS Office

Tired of dealing with legacy UI bugs and ribbon freezes in Microsoft Excel? WPS Office provides a lightweight, highly compatible alternative that processes complex VBA macros smoothly without locking up your workspace.

  1. 1. Download the software: Visit the official WPS website and download the free installer.
  2. 2. Install WPS Office: Run the setup file to install WPS Spreadsheets on your computer.
  3. 3. Open your macro workbook: Open your existing .xlsm file directly in WPS to enjoy stable, freeze-free macro execution.
Fully compatible with Microsoft Excel formats, including .xlsm macro-enabled workbooks.Reliable VBA engine handles rapid sheet visibility events without freezing the interface.Lightweight application that uses fewer system resources and loads instantly.Provides familiar UI and layout, making migration completely seamless.
microsoft office alternative - wps office

Frequently Asked Questions

What does 'very hidden' mean in Excel?

A 'very hidden' sheet (xlSheetVeryHidden) is a worksheet that cannot be unhidden using the standard right-click menu in the Excel interface. It can only be made visible again through VBA code or the Properties window in the VBA Editor.

Why does the Excel ribbon freeze when running VBA?

The ribbon can freeze if VBA code changes UI states rapidly without ScreenUpdating disabled, or if an event loop (like Workbook_SheetDeactivate) triggers conflicting application states that the legacy UI engine fails to resolve.

Can I disable events manually to unfreeze Excel?

Yes. If your application is stuck in an event loop but you can access the VBA Editor, you can open the Immediate Window (Ctrl + G), type 'Application.EnableEvents = False', and press Enter to stop the events.

How do I access the VBA Editor in Excel?

You can open the VBA Editor by pressing Alt + F11 on your keyboard, or by navigating to the Developer tab on the ribbon and clicking the 'Visual Basic' button.