创建目录

Private Sub CommandButton1_Click()
Application.DisplayAlerts = False
On Error Resume Next
Sheets("??").Delete
Sheets.Add Sheets(1)
ActiveSheet.Name = "??"
For i = 2 To Sheets.Count
   ActiveSheet.Hyperlinks.Add Anchor:=Cells(i + 1, 3), Address:="", SubAddress:=Sheets(i).Name & "!a1", TextToDisplay:=Sheets(i).Name
   Cells(i + 1, 2) = i - 1
Next
Columns("a:z").AutoFit
Unload Me
Application.DisplayAlerts = True
End Sub

 

posted on 2020-11-14 22:05  lizicheng  阅读(102)  评论(0编辑  收藏  举报

导航