zuochencun

很多隐藏的子页,一个主页,主页里面包含跳转子页的链接,点击主页里子页链接,跳转到对应的子页,

下方只显示一个主页+对应的子页

 

 

 

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

 

分类:

技术点:

相关文章:

  • 2021-12-05
  • 2021-06-25
  • 2021-12-04
  • 2022-01-19
  • 2021-11-21
  • 2021-07-12
  • 2021-08-30
猜你喜欢
  • 2021-06-18
  • 2021-08-04
  • 2021-12-29
  • 2021-04-21
  • 2021-11-09
相关资源
相似解决方案