hidden sheets code

JasonLeVan

Board Regular
Joined
Feb 7, 2011
Messages
121
is there a vba code to hide all sheets but the first one, but still access the hidden sheets b/c i have info on them with links to them
 

Some videos you may like

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.

bjurney

Active Member
Joined
Aug 24, 2009
Messages
320
This will hide each sheet:

Code:
Sub hide()
Dim ws As Worksheet
Application.DisplayAlerts = False
For Each sh In ActiveWorkbook.Worksheets
If sh.Name <> "Sheet1" Then
sh.Visible = xlSheetHidden
End If
Next sh
End Sub

You will need to write a code though to unhide the sheets when a target cell is clicked from the hyperlink though.
 

Watch MrExcel Video

Forum statistics

Threads
1,109,032
Messages
5,526,360
Members
409,697
Latest member
christopherlewis1620

This Week's Hot Topics

Top