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
网友评论