Hi, complete newb. I was looking to hide sheets that are linked from a Title Sheet. I followed the code from
but I'm getting an error, as highlighted below. I assumed I would need to change something from the code in the video but can't see what. should (MySheet) actually be the name of a specific sheet? The video was excellent but I can't get the code to work.
VBA Code:
Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
LinkTo = Target.SubAddress
WhereBang = InStr(1, LinkTo, "!")
If WhereBang > 0 Then
MySheet = Left(LinkTo, WhereBang - 1)
[COLOR=rgb(226, 80, 65)]Worksheets(MySheet).Visible = True[/COLOR]
Worksheets(MySheet).Select
MyAddr = Mid(LinkTo, WhereBang + 1)
Worksheets(MySheet).Range(MyAddr).Select
End If
End Sub
Last edited by a moderator: