How to Hide the Excel Ribbon and Restrict Dashboard Navigation in WPS Spreadsheet
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 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.
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.
In WPS Spreadsheet, click the Developer tab, then choose Visual Basic or press Alt+F11 to open the editor.
In the Project Explorer, double-click ThisWorkbook under the current workbook project.
Paste the following code into the code window: Private Sub Workbook_Open() Application.ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",False)" End Sub
Save the workbook as a macro-enabled file (.xlsm), close it, and reopen it with macros enabled to hide the ribbon.
Restore the Excel Ribbon When the Dashboard Closes
Use this companion VBA event to show the ribbon again when the user closes the workbook so the WPS or Excel interface returns to normal.
Protect Workbook Structure and Worksheets While Keeping Filters and Slicers Usable
Use this solution to stop users from adding, deleting, hiding, or renaming sheets while still allowing dashboard filters and slicers.
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. Open your dashboard in WPS Spreadsheet: Launch WPS Office and open the Excel workbook or create a new dashboard in WPS Spreadsheet.
- 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. Protect workbook structure: Go to Review > Protect Workbook and set a password to prevent sheet changes.
- 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. 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.

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.




