Hyperlink to hidden sheet

SDave

Board Regular
Joined
Aug 12, 2008
Messages
152
Office Version
  1. 365
Platform
  1. MacOS
Is it possible to hyperlink to a hidden sheet in Excel?!

I was using the following code:

Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
Dim strShtName As String
strShtName = Left(Target.Parent, InStr(1, Target.Parent, "!") - 1)
With Worksheets("Potential - Summary")
.Visible = xlSheetVisible
.Select
End With
End Sub

However for some unknown reason the code no longer seems to work?!

I don't know whether or not it is because I have added another code which hides the two sheets that I want hidden if visible when the file is closed - please see below.

Private Sub Workbook_BeforeClose(Cancel As Boolean)

Sheets("Potential - Summary").Visible = True
Sheets("Potential - Summary").Select
Range("A1").Select
Sheets("Potential - Summary").Select
ActiveWindow.SelectedSheets.Visible = False
Range("A1").Select
Sheets("Performance - Summary").Visible = True
Sheets("Performance - Summary").Select
Range("A1").Select
Sheets("Performance - Summary").Select
ActiveWindow.SelectedSheets.Visible = False
Range("A1").Select

End Sub

Any help would be much appreciated.
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Thread resolved. I used the following code to hyperlink to my hidden sheet:

Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
Worksheets("Potential Summary Breakdown").Visible = xlSheetVisible
Sheets("Potential Summary Breakdown").Visible = True
Sheets("Potential Summary Breakdown").Select
End Sub
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,848
Members
452,361
Latest member
d3ad3y3

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