VBA & Macro Problems

How to Hide the Excel Ribbon and Restrict Dashboard Navigation in WPS Spreadsheet

John WilsonJohn Wilson Nov 13, 2026 869 views

Question details

User wants an Excel dashboard to open with the ribbon hidden and to restrict users from changing worksheet structure while keeping filters and slicers functional.

Product
WPS Spreadsheet
Device & OS
not provided
Scenario
Building or preparing an Excel dashboard for end users where navigation should be limited and the interface clean.
Observed behavior
The ribbon is visible by default and worksheet structure can be changed unless the workbook is protected; filters and slicers may become unusable if protection is configured incorrectly.
Before you start

Before editing the ThisWorkbook module, save the workbook as a macro-enabled file (.xlsm) and make sure the Developer tab is visible so you can open the Visual Basic editor.

Solution 1Recommended

Hide the Excel Ribbon When the Dashboard Opens with VBA

Use this solution to automatically hide the ribbon when the dashboard workbook opens so users see a clean dashboard interface.

The Workbook_Open event runs automatically each time the workbook opens. The ExecuteExcel4Macro command hides the Ribbon UI without requiring user interaction.

1
Open the Visual Basic editor

In WPS Spreadsheet, click the Developer tab, then choose Visual Basic or press Alt+F11 to open the editor.

2
Select ThisWorkbook

In the Project Explorer, double-click ThisWorkbook under the current workbook project.

3
Add the Workbook_Open code

Paste the following code into the code window: Private Sub Workbook_Open() Application.ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",False)" End Sub

4
Save and enable macros

Save the workbook as a macro-enabled file (.xlsm), close it, and reopen it with macros enabled to hide the ribbon.

Not a security control: Hiding the ribbon only cleans the interface; it does not prevent users from opening the VBA editor or restoring the ribbon manually.

Hide the Ribbon and Restrict Dashboard Navigation with WPS Spreadsheet

WPS Spreadsheet can directly set up a clean dashboard environment with VBA ribbon control and workbook protection, while keeping filters and slicers usable for end users.

  1. 1. Open your dashboard in WPS Spreadsheet: Launch WPS Office and open the Excel workbook or create a new dashboard in WPS Spreadsheet.
  2. 2. Add the Workbook_Open VBA event: Press Alt+F11, double-click ThisWorkbook, and enter the macro to hide the ribbon when the file opens.
  3. 3. Protect workbook structure: Go to Review > Protect Workbook and set a password to prevent sheet changes.
  4. 4. Protect worksheets and allow interactions: Use Review > Protect Sheet to protect each dashboard sheet and check the options for AutoFilter and slicer use.
  5. 5. Save and test for users: Save as .xlsm and reopen in WPS Spreadsheet or Microsoft Excel to confirm the ribbon is hidden and filters/slicers work.
Clean dashboard interface with the ribbon hidden on openWorkbook structure protection prevents sheet deletion and renamingFull compatibility with Microsoft Excel .xlsm and .xlsx filesFree, lightweight WPS Office tools for VBA and dashboard filesFamiliar ribbon-style UI and Review protection tools
microsoft office alternative - wps office

Frequently Asked Questions

Will hiding the ribbon prevent users from restoring it manually?

No. The VBA code hides the ribbon only while the workbook is open, and a user can still show it from the Ribbon Display Options or close and reopen the file. Pair it with workbook and sheet protection to limit changes.

Can I use these Excel macros in WPS Spreadsheet?

Yes. WPS Spreadsheet supports the Workbook_Open and Workbook_BeforeClose events and ExecuteExcel4Macro in VBA, but you should save the workbook as a macro-enabled .xlsm file and enable macros.

Why do my slicers stop working after I protect the sheet?

Slicers stop responding when the sheet protection settings do not allow the required actions. Unprotect the sheet, then in Review > Protect Sheet enable Use AutoFilter and PivotTable options, and test the slicers again.

Does worksheet protection make the dashboard completely secure?

No. Excel and WPS worksheet protection is a navigation and editing barrier, not a security boundary. Use strong workbook passwords and share files only with trusted users if you need stricter protection.

How do I restore the ribbon if the file is already open without the code?

Use the Ribbon Display Options button near the top-right corner or press Ctrl+F1 to show the ribbon. To restore it automatically on close, add the Workbook_BeforeClose event.