I've got a list of hyperlinks leading to multiple different hidden sheets in a workbook, using the following for each:
Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
Application.ScreenUpdating = False
Worksheets("LL - JLL").Visible = xlSheetVisible
Sheets("LL - JLL").Visible = True
Sheets("LL - JLL").Select
Application.ScreenUpdating = True
End Sub
From what I can tell this now applies to every hyperlink on the sheet. Eevery hyperlink now leads to the same sheet, LL - JLL
, whereas I would need each hyperlink to lead to a different sheet. For example,
Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
Application.ScreenUpdating = False
Worksheets("LL - JLL").Visible = xlSheetVisible
Sheets("LL - JLL").Visible = True
Sheets("LL - JLL").Select
Application.ScreenUpdating = True
Application.ScreenUpdating = False
Worksheets("LL - EMS").Visible = xlSheetVisible
Sheets("LL - EMS").Visible = True
Sheets("LL - EMS").Select
Application.ScreenUpdating = True
Application.ScreenUpdating = False
Worksheets("LL- CCURE").Visible = xlSheetVisible
Sheets("LL- CCURE").Visible = True
Sheets("LL- CCURE").Select
Application.ScreenUpdating = True
End Sub
The following code makes all hyperlinks on the sheet lead to the LL-CURE
sheet, rather than their correspondent sheets.
Creating a new Sub for different hyperlinks leads to
Compile error:
Ambiguous name detected: Worksheet_FolowHyperlink
Any guidance would be greatly appreciated :)