|
If co = 4 And cs > 24 Then
p2 = Right(Sheet5.Cells(I, 1), 3)
Sheet2.Cells(2, 5) = "档案号:" & P & "(" & p1 & "-" & p2 & ")"
'Sheet2.PrintOut From:=1, To:=1
Sheet2.[A1].Resize(28, 6).Copy Sheets(Max).Cells(k, 1)
Sheets(Max).Cells(k, 1).RowHeight = 60.75
Sheets(Max).Cells(k + 1, 1).RowHeight = 20.25
Sheets(Max).Cells(k + 2, 25).RowHeight = 24
k = k + 28
Sheets(Max).Cells(k, 1).PageBreak = xlPageBreakManual
cs = 0
co = 1
p1 = Right(Sheet5.Cells(I + 1, 1), 3)
Sheet2.Cells(4, 2).Resize(28, 6).ClearContents
End If
If cs > 24 Then
co = co + 3
cs = 0
End If
Next
Application.ScreenUpdating = ture
End Sub |
|