美文网首页
一键链接生成目录

一键链接生成目录

作者: 心的知觉 | 来源:发表于2017-09-27 11:03 被阅读0次

    Sub ml()

    Dim sht As Worksheet, i&, Shtname$

    Sheets.Add.Name = "目录汇总表"

    Cells(1, 1) = "目录"

    i = 1

    For Each sht In Worksheets

    Shtname = sht.Name

    If Shtname <> ActiveSheet.Name Then

    i = i + 1

    ActiveSheet.Hyperlinks.Add _

    anchor:=Cells(i, 1), Address:="", SubAddress:="" & Shtname & "!a1", TextToDisplay:=Shtname

    End If

    Next

    End Sub

    相关文章

      网友评论

          本文标题:一键链接生成目录

          本文链接:https://www.haomeiwen.com/subject/emoyextx.html