How to Hide Excel Sheet Tabs Without Breaking Hyperlinks
Question details
The user needs to hide worksheet tabs to create a cleaner interface while ensuring that internal hyperlinks pointing to those hidden sheets continue to function automatically.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Designing a clean, navigation-driven workbook interface by hiding default sheet tabs but maintaining functional internal hyperlink navigation.
- Observed behavior
- By default, clicking a hyperlink that targets a hidden sheet results in an invalid reference error. The intended state is for the sheet to automatically unhide and activate when its link is clicked.
Ensure you are comfortable using the VBA Editor, and remember to save your file as a Macro-Enabled Workbook (.xlsm) for the script to execute successfully.
Use the Workbook_SheetFollowHyperlink VBA Event
Add a VBA macro to the ThisWorkbook module that detects a clicked hyperlink, unhides the destination sheet, and activates the target cell.
Native Excel hyperlinks cannot navigate to hidden worksheets. By using the Workbook_SheetFollowHyperlink event, you can intercept the hyperlink click before the error occurs. The macro reads the hyperlink's destination, changes the target worksheet's visibility property, and successfully navigates the user to the intended cell.
Press Alt + F11 on your keyboard to launch the Visual Basic for Applications (VBA) editor.
In the Project Explorer pane on the left side of the window, locate your current workbook and double-click 'ThisWorkbook' to open its code window.
Select 'Workbook' from the top-left dropdown above the code window, and 'SheetFollowHyperlink' from the top-right dropdown. Insert the script required to extract the hyperlink target, unhide the destination worksheet, and activate it.
Close the VBA editor and go to File > Save As. Choose 'Excel Macro-Enabled Workbook (*.xlsm)' from the format dropdown so the script runs automatically on future clicks.

Execute VBA Macros Seamlessly with WPS Office
WPS Spreadsheet offers comprehensive support for VBA and macros. You can easily insert, edit, and run Worksheet and Workbook events to manage hidden sheets and complex hyperlink navigation, exactly as you would in Microsoft Office.
- 1. Open your Workbook in WPS Spreadsheet: Launch WPS Spreadsheet and open your existing .xlsx or .xlsm file.
- 2. Navigate to the Developer Tab: Click on the 'Developer' tab in the top ribbon menu to access your macro and VBA tools.
- 3. Launch the VBA Editor: Click the 'VB Editor' button to open the coding environment and double-click 'ThisWorkbook' in the Project window.
- 4. Apply and Run the Macro: Paste your SheetFollowHyperlink VBA script, save the workbook as a macro-enabled format, and seamlessly test your unhiding hyperlinks.

Frequently Asked Questions
Why do standard hyperlinks fail when linking to a hidden Excel sheet?
Excel's native hyperlink functionality requires the target destination to be visible on the screen. If the worksheet tab is hidden, the application cannot bring the destination into view, which triggers an invalid reference error.
What is the difference between xlSheetHidden and xlSheetVeryHidden in VBA?
When a sheet is set to xlSheetHidden, users can easily unhide it manually by right-clicking any visible sheet tab and selecting 'Unhide'. If it is set to xlSheetVeryHidden, the sheet will not appear in the standard unhide menu and can only be made visible again using a VBA macro.
Do I need to enable macros for this hyperlink solution to work?
Yes. Because the automatic unhiding relies on a VBA background event (Workbook_SheetFollowHyperlink), you must enable macros in your Trust Center or Macro Security settings, and the file itself must be saved in a macro-enabled format like .xlsm.




