工作表逐行操作打印

EH论坛中,有题主问如何实现自工作表第二行起逐行背景加灰,并一式打印三份。

1
2
3
4
5
6
7
Sub test()
For I = 2 To Range("A1").CurrentRegion.Rows.Count
Range("A" & I & ":" & "C" & I).Interior.ThemeColor = xlThemeColorDark2
Application.ActiveSheet.PrintOut COPIES:=3
Range("A" & I & ":" & "C" & I).Interior.ThemeColor = xlThemeColorDark1
Next
End Sub