Forum Discussion
Hiding tabs in excel but retain links to other sheets
- Oct 26, 2024
If manually you may uncheck this setting
Please note, it's on workbook basis, not global.
If by VBA you shall use
ActiveWindow.DisplayWorkbookTabs = False
in macro which NikolinoDE suggested, Application.CommandBars("Workbook Tabs").Visible doesn't work.
Hide the Worksheet Tabs with out VBA:
Go to the File menu in Excel.
Select Options.
In the Excel Options dialog box, go to the Advanced section.
Scroll down to the Display options for this workbook.
Uncheck the box that says Show sheet tabs.
Click OK.
Hide the Worksheet Tabs with VBA:
You can add a macro that re-hides the tabs if a user tries to unhide them:
Private Sub Workbook_Open()
Application.CommandBars("Workbook Tabs").Visible = False
End Sub
This code will run whenever the workbook is opened, ensuring the tabs remain hidden. However, it requires enabling macros.
My answers are voluntary and without guarantee!
Hope this will help you.
- NikolinoDEOct 26, 2024Gold Contributor
Both lines of code can hide the worksheet tabs in Excel, but they have different scopes and behaviors.
ActiveWindow.DisplayWorkbookTabs = False
Sergei's suggestion is the more commonly used approach and is specific to the active window of the workbook.
Application.CommandBars("Workbook Tabs").Visible = False
This approach is intended to modify the visibility of command bars.
Please use Sergei's suggestion "ActiveWindow.DisplayWorkbookTabs = False".
This is the easier way to hide the worksheet tabs for the currently active workbook window.
Sergei thanks for the correction...sometimes thoughts are in the past.
- steve_2931Oct 26, 2024Copper ContributorThank you, I am away for a few days but will give this a go when I return. Thank you for taking the trouble to reply. Regards Steve