|
9910343 发表于 2012-9-6 08:32
Sub 批量打印()
Dim i%, j%
- Sub 批量打印()
- Dim i%, j%
-
- Application.ScreenUpdating = False
- Sheets("成绩单").Activate
- If [D6] > [D7] Then MsgBox "起始必须小于结束!": [D6] = "": [D7] = "": Exit Sub
-
- With Sheets("资料")
- For i = [D6] To [D7]
- If .Cells(i + 1, 6) + .Cells(i + 1, 7) > 180 Then
- [C3] = .Cells(i + 1, 1)
- [E3] = .Cells(i + 1, 2)
- [G3] = .Cells(i + 1, 3)
- [I3] = .Cells(i + 1, 4)
- [C4] = .Cells(i + 1, 5)
- [E4] = .Cells(i + 1, 6)
- [G4] = .Cells(i + 1, 7)
- [I4] = .Cells(i + 1, 8)
- .PageSetup.PrintArea = "$B$3:$I$4"
- .PrintOut
- End If
- Next
- End With
- End Sub
复制代码 学习5201314的方法
有条件批量打印3.rar
(10.25 KB, 下载次数: 22)
|
评分
-
查看全部评分
|