How to Fix Excel Ribbon Freezing When Unhiding Very Hidden Sheets
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.

- 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.
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.
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.
Press Alt + F11 on your keyboard to launch the Visual Basic for Applications (VBA) editor.
Find the specific module or the Workbook_SheetDeactivate event where your code hides and unhides the very hidden sheets.
At the very beginning of the visibility toggle process, add the lines: Application.ScreenUpdating = False and Application.EnableEvents = False.
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.
At the end of your macro sequence, restore Excel's normal behavior by adding: Application.ScreenUpdating = True and Application.EnableEvents = True.

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. Download the software: Visit the official WPS website and download the free installer.
- 2. Install WPS Office: Run the setup file to install WPS Spreadsheets on your computer.
- 3. Open your macro workbook: Open your existing .xlsm file directly in WPS to enjoy stable, freeze-free macro execution.

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.




