Hyperlink to Hidden Sheets

Charisa_L

New Member
Joined
Jan 10, 2011
Messages
2
Hi there

I have a worksheet with 7 Sheets. The first sheet is a summary and I’ve created hyperlinks to the other 6 sheets for a person to access from the main page. [Sheet names: Sheet1 (Summary), Sheet2 (100% Complete), Sheet3 (Almost Complete), Sheet4 (One Piece), Sheet5 (Two Pieces), Sheet 6 (Three Pieces), Sheet 7 (Have Nothing)]

I want to hide all sheets except for the first one, which I can do and works fine. But from there, I still want the hyperlinks to work. I need the hyperlinks to open(unhide) the hidden page and then close(hide) it again when I click on the “back to Summary” hyperlink on each of the hidden pages.

Is this possible? Will you please tell me how to do it?

Thank you
Charisa
 
That is beautiful. Works nice. Sorry for bringing this one back to life again. I'm a complete vba noob but I was able to implement the code. Is there anyone who can help me with a modification to the code?

Basically the code unhides and activates a sheet when a cell is double clicked. If the tab is switched, the sheet is hidden again. It's awesome. Does anybody know how I can stop it from hiding all the sheets after switching tabs? I want it to only hide the previously unhidden sheet, not every single sheet in the workbook.
 
Upvote 0

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
I'm not allowed to edit a post, therefore sending this one so that the code can be also seen on page 2.

Code:
Private Sub Worksheet_Activate()
Dim sh As Worksheet

For Each sh In ThisWorkbook.Sheets
If sh.Name <> "Summary" Then
sh.Visible = xlSheetHidden
End If
Next sh
End Sub
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Select Case Target.Address
Case "$A$1"
Sheets("100% Complete").Visible = True
Sheets("100% Complete").Activate
Case "$A$2"
Sheets("Almost Complete").Visible = True
Sheets("Almost Complete").Activate
End Select
End Sub
 
Upvote 0
Hello.

I'm a complete noob to VBA so I'm having issues running the code above. Does the code above need to be saved to a single macro? If I save it to a single macro, it won't run.

Here is what I have

Private Sub Worksheet_Activate()
Dim sh As Worksheet

For Each sh In ThisWorkbook.Sheets
If sh.Name <> "Ship Request" And sh.Name <> "Test Equipment Part Numbers" And sh.Name <> "Warehouse Location #s" Then
sh.Visible = xlSheetHidden
End If
Next sh
End Sub
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Select Case Target.Address
Case "$D$21"
Sheets("10031852").Visible = True
Sheets("10031852").Activate
Case "$D$22"
Sheets("10032378").Visible = True
Sheets("10032378").Activate
End Select
End Sub
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,876
Members
452,363
Latest member
merico17

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top