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.
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.