|
求人批注~~每句是代表是什么意思嘛,麻烦一下嘛~
Private Sub 工作清单表分解_Click()
Dim I As Integer
I = 3
Do While Sheets("编号").Cells(I, 2) <> ""
Sheets("表格").Select
Sheets("表格").Rows("1:1").Select
Selection.AutoFilter
Sheets("表格").Range("E2").Select
Selection.AutoFilter Field:=2, Criteria1:=Sheets("编号").Cells(I, 2)
Sheets("表格").Range("A1:AZ600").Select
Selection.Copy
Application.WindowState = xlMinimized
Workbooks.Add
Worksheets("sheet1").Activate
Sheets("sheet1").Range("a3").PasteSpecial
Application.CutCopyMode = False
Sheets("sheet1").Range("A1").Select
Sheets("sheet1").Cells(1, 1) = "员工 " & Sheet1.Cells(I, 2) & " 的工作清单"
Selection.Font.Bold = True
With Selection.Font
.Name = "宋体"
.Size = 16
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
ActiveWorkbook.SaveAs Filename:="D:\员工分表\" & Sheet1.Cells(I, 2) & ".xls"
ActiveWindow.Close
I = I + 1
Loop
MsgBox "表格制作完成!"
End Sub
|
|