很多隐藏的子页,一个主页,主页里面包含跳转子页的链接,点击主页里子页链接,跳转到对应的子页,
下方只显示一个主页+对应的子页
Private Sub Worksheet_Activate()
For i = 1 To Sheets.Count
If Sheets(i).Name <> "目录" And Sheets(i).Name <> "Forecast Sum" Then Sheets(i).Visible = 0
Next
End Sub
Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
Dim sh As Object
On Error Resume Next
Set sh = Sheets(Replace(Split(Target.SubAddress, "!")(0), "'", ""))
If Not sh Is Nothing Then
Application.EnableEvents = False
sh.Visible = xlSheetVisible
Target.Follow
Application.EnableEvents = True
End If
End Sub