Hide or Unhide Worksheets
To hide worksheets in Excel, you can use the following steps:
- Right-click on the worksheet tab that you want to hide or unhide. You can select multiple worksheets by holding
Ctrland clicking on the tabs.
Hidefrom the context menu.
- The worksheet will disappear from the workbook.
To unhide worksheets use the following steps:
- Right-click on any visible worksheet tab
Unhidefrom the context menu.
- The Unhide dialog box will appear with a list of hidden worksheets.
- Select the worksheet that you want to unhide.
- Click OK.
Alternatively, you can use the ribbon to hide and unhide worksheets:
- Locate the
Format > Hide & Unhide > Hide Sheetor
xlVeryHidden – Make Very Hidden Worksheets
Each Excel worksheet has three options for its
Visible property. These options are represented by constants in the
xlSheetVisibility enumeration and are as follows:
- xlSheetVisible :
-1(default for new sheets)
The worksheet is visible in the sheet tab bar and can be freely selected and viewed.
- xlSheetHidden :
The worksheet is hidden from the sheet tab bar and is not selectable. You can unhide such sheets by right-clicking on the sheet tab (see Hide or Unhide Worksheets)
- xlSheetVeryHidden :
The worksheet is only accessible through the Visual Basic Editor. The sheets can be accessed by named reference within VBA code, allowing easy use of the stored data
Let’s fiddle with the worksheet’s Visible property, making it
Alt+F11to open VBE (Visual Basic Editor).
View » Project Explorerif the Project Explorer window is not visible.)
- Find the name of your workbook within the Project Explorer and expand its hierarchy by clicking the + to the left of the workbook’s name.
- Expand the Microsoft Excel Objects folder within to reveal all your workbook’s worksheets.
- Select the sheet you want to make very hidden from the Project Explorer.
(Reveal worksheet properties by selecting
View » Properties Windowif not visible).
- Make sure the
Alphabetictab is selected, and look for the
Visibleproperty at the very bottom.
- Click the value box on the right associated with the Visible property and select the last option, 2 – xlSheetVeryHidden, as shown in the figure.
Alt-Qto save your changes and return to Excel.
The sheet will no longer be visible via the Excel interface and no longer appears when you use Excel’s Unhide feature
To reverse the process, simply follow the preceding steps, this time selecting -1 – xlSheetVisible.
Hide or Unhide Workbook Window
You cannot hide all the worksheets in a workbook. There must be at least one visible worksheet at all times. If you want to hide a workbook window entirely, you can use the
View tab > Window group > Hide or use
Unhide option to unhide the window.