新建一个excel文件,按alt+F11,在左边点右键,插入,模块,双击模块,粘贴下面的代码。
然后按F5,运行新建宏。输入张数,
很快就建立完成了。
Sub 新建()
Dim arr, sh As Worksheet
shtNum = Application.InputBox("请输入复制工作表的张数", Type:=1)
If shtNum = 0 Then Exit Sub
Application.ScreenUpdating = False
On Error Resume Next
Application.DisplayAlerts = False
Workbooks.Add
With ActiveWorkbook
For i = 1 To shtNum
.Sheets.Add after:=.Sheets(.Sheets.Count)
ActiveSheet.Name = "2011-6b-" & i
Next i
End With
Application.ScreenUpdating = True
End Sub