Option Explicit
Sub 列印()
Dim I%, J%, X%, Y%, ades
For I = 1 To 9
For J = 1 To 6
X = I * 20 - 19: Y = J * 6 - 5
If Cells(X, Y).Offset(2).Value <> "*空白*" Then '請問這如何用萬用字元呢? 想改成 *空白*則不印
ades = Range(Cells(X + 1, Y), Cells(I * 20, J * 6 - 1)).Address
'ActiveSheet.PageSetup.PrintArea = ades
Range(ades).PrintOut Copies:=1, Collate:=True
End If
Next
Next
End Sub作者: starry1314 時間: 2016-1-12 15:56