写个循环即可- Sub CopyAndPrintCells()
- Dim wsFilter, wsPrint, wsSour As Worksheet
- Dim cell As Range
-
- Set wsFilter = ThisWorkbook.Sheets("工程筛选")
- Set wsPrint = ThisWorkbook.Sheets("10工程开工报审表 (2)")
- Set wsSour = ThisWorkbook.Sheets("工程汇总")
-
- For Each cell In wsSour.Range("A69:A" & wsSour.Cells(wsFilter.Rows.Count, 1).End(xlUp).Row)
- wsSour.Range(cell.Address).Copy
- wsFilter.Range(cell.Address).PasteSpecial xlPasteAll
- wsPrint.Activate
- Application.EnableEvents = False
- ActiveWindow.SelectedSheets.PrintOut From:=1, To:=2147483647, Copies:=1, Preview:=False, ActivePrinter:="RICOH MP 3055 PCL 6_1", PrintToFile:=False, Collate:=False, IgnorePrintAreas:=False
- Application.EnableEvents = True
- Application.CutCopyMode = False
- Next cell
- End Sub
复制代码
|