Nate199230
New Member
- Joined
- Jun 25, 2024
- Messages
- 4
- Office Version
- 365
- Platform
- Windows
- Mobile
I'm extremely new to this and I am having issues with this code. I can't seem to figure out what needs to be done. I tried following along with a video and when he runs it, it doesn't pop up the same thing as mine. The line that pops up when I press debug is the one written in yellow since I don't see a highlight option. I am trying to get my hyperlinks on my page1 to work when the other pages are hidden. Thank you in advance for any help.
Private Sub Workbook_SheetFollowHyperlink(ByVal Sh As Object, ByVal Target As Hyperlink)
LinkTo = Target.SubAdress
WhereBang = InStr(1, LinkTo, "!")
If WhereBang > 0 Then
MySheet = Left(LinkTo, WhereBang - 1)
Worksheets(MySheet).Visible = True
Worksheets(MySheet).Select
MyAddr = Mid(LinkTo, WhereBang + 1)
Worksheets(MySheet).Range(MyAddr).Select
End If
End Sub
Private Sub Workbook_SheetFollowHyperlink(ByVal Sh As Object, ByVal Target As Hyperlink)
LinkTo = Target.SubAdress
WhereBang = InStr(1, LinkTo, "!")
If WhereBang > 0 Then
MySheet = Left(LinkTo, WhereBang - 1)
Worksheets(MySheet).Visible = True
Worksheets(MySheet).Select
MyAddr = Mid(LinkTo, WhereBang + 1)
Worksheets(MySheet).Range(MyAddr).Select
End If
End Sub