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
Ctrl
and clicking on the tabs. - Select
Hide
from the context menu. - The worksheet will disappear from the workbook.
To unhide worksheets use the following steps:
- Right-click on any visible worksheet tab
- Select
Unhide
from 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:
- Click
Home
tab - Locate the
Cells
group - Click
Format > Hide & Unhide > Hide Sheet
orUnhide Sheet
option.
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 :
0
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 :
2
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 xlVeryHidden
:
- Press
Alt+F11
to open VBE (Visual Basic Editor).
(SelectView » Project Explorer
if 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 selectingView » Properties Window
if not visible). - Make sure the
Alphabetic
tab is selected, and look for theVisible
property 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.
- Press
Alt-Q
to 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.