Hello,
I am very new to VBA and following a few tutorials online to try and click a link on a main sheet to access data on a hidden sheet and then have it hidden again. When I use the following macro, I get a bug error message. I have attached a screen show of the debugger and my spreadsheet. There is no data on it yet, just the sheets and links as I want to make sure this will work before doing it.
Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
linkto = Target.SubAddress
wherebang = InStr(1, linkto, "1")
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
Appreciate the help!
Ashley
Bookmarks