新工作簿保存在d:\
Sub 统计()
Dim I As Integer, zROW As Integer, zN As Integer
Dim zNAME As String, zPATH As String
ActiveWindow.Caption = "汇总"
zN = 1
'******下面zROW=的是你要打印的行数
zROW = 5
Range("A1").Select
Do Until ActiveCell = ""
Workbooks.Add
Application.DisplayAlerts = False
ActiveWindow.Caption = "BOOK"
Do Until Sheets.Count = 1
Sheets(2).Delete
Loop
Application.DisplayAlerts = True
Windows("汇总").Activate
Rows(ActiveCell.Row & ":" & ActiveCell.Row + zROW - 1).Copy
Windows("BOOK").Activate
Range("A1").Select
ActiveSheet.Paste
ChDir "D:"
ActiveWorkbook.SaveAs Filename:="D:\" & zN & ".xls", FileFormat:=xlNormal
ActiveWindow.Close
ActiveCell.Offset(zROW).Select
zN = zN + 1
Loop
End Sub
如何将一张工作表拆分成多个工作表?