Hi All,
Sorry if this is a basic question but ive been stumped for a day or so trying various things.
I have a workbook that has numerous sheets all of which the most recent are hidden.
I have created an archive tab and indexed all the hidden sheets with a hyperlink to them so a user can click on the link and view the sheet.
to do this I use a piece of code in the "Archive" sheet code as follows
This works great as it is however i wanted to make the hyperlink names more friendly/obvious so changed the display names. the links now dont work and Im guessing its due to the target.name/display name not being the sheets name so how do i modify that line of code to set the worksheet to be hyperlink address rather than the display name.
Sorry if this is a basic question but ive been stumped for a day or so trying various things.
I have a workbook that has numerous sheets all of which the most recent are hidden.
I have created an archive tab and indexed all the hidden sheets with a hyperlink to them so a user can click on the link and view the sheet.
to do this I use a piece of code in the "Archive" sheet code as follows
VBA Code:
Private Sub Worksheet_FollowHyperlink(ByVal target As Hyperlink)
Dim ws As Worksheet
Set ws = sheets(target.name)
ws.Visible = True
ws.Activate
End Sub
This works great as it is however i wanted to make the hyperlink names more friendly/obvious so changed the display names. the links now dont work and Im guessing its due to the target.name/display name not being the sheets name so how do i modify that line of code to set the worksheet to be hyperlink address rather than the display name.