Hi there
I'm using this code to Hyperlink to hidden worksheet once double click and it should be hidden when I get back to "Overall" sheet, and its working fine with me. but i have to add new case everyday. as everyday will be a new worksheet. Is there any other way to make it easiest?
any help would be appreciated.
My main worksheet is "Overall" and all the hyperlinks at the $B column. everyday there will be a new worksheet named same as that day.
regards,,
-------------------------
Private Sub Worksheet_Activate()
Dim sh As Worksheet
For Each sh In ThisWorkbook.Sheets
If (sh.Name <> "Overall") Then
sh.Visible = xlSheetHidden
End If
Next sh
End Sub
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Select Case Target.Address
Case "$B$4"
Sheets("280617").Visible = True
Sheets("280617").Activate
Case "$B$5"
Sheets("290617").Visible = True
Sheets("290617").Activate
Case "$B$6"
Sheets("300617").Visible = True
Sheets("300617").Activate
Case "$B$7"
Sheets("030717").Visible = True
Sheets("030717").Activate
Case "$B$8"
Sheets("040717").Visible = True
Sheets("040717").Activate
Case "$B$9"
Sheets("050717").Visible = True
Sheets("050717").Activate
Case "$B$55"
Sheets("260917").Visible = True
Sheets("260917").Activate
End Select
End Sub
Bookmarks