I have some hyperlinks that go to hidden sheets on my workbook without issue. But I have a if the statement that works when the page I am hyperlinking to is not hidden. I would like it to work when it is hidden.
the if then statement is
=IF(EXACT(B7,"Vanco"),HYPERLINK("#Vanco!B2","Click for Alternate Vanco Sheet"),"")
My Current VBA which allows my other links to work
Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
LinkTo = Target.SubAddres
WhereBang = InStr(1,LinkTo, "!")
If whereBang>0 Then
MySheet = Left(LinkTo, WhereBang -1)
Worksheet(MySheet).Visible=True
Worksheet(MySheet).Select
MyAddr=Mid(LinkTo,WhereBang+1)
Worksheets(MySheet).Range(MyAddr).Select
End If
End Sub
the if then statement is
=IF(EXACT(B7,"Vanco"),HYPERLINK("#Vanco!B2","Click for Alternate Vanco Sheet"),"")
My Current VBA which allows my other links to work
Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
LinkTo = Target.SubAddres
WhereBang = InStr(1,LinkTo, "!")
If whereBang>0 Then
MySheet = Left(LinkTo, WhereBang -1)
Worksheet(MySheet).Visible=True
Worksheet(MySheet).Select
MyAddr=Mid(LinkTo,WhereBang+1)
Worksheets(MySheet).Range(MyAddr).Select
End If
End Sub