KhanofTarkir
New Member
- Joined
- Sep 3, 2014
- Messages
- 24
Hi all,
I am having some trouble with the code below - when I run the macro I simply print out 7 duplicate copies of the target range of cells in the first tab as opposed to one copy of the target range of cells for each different individual tab. There are 7 tabs in total in the workbook, so I am guessing that the macro is looping the print dialog 7 times for a single tab. Any help would be greatly appreciated
I am having some trouble with the code below - when I run the macro I simply print out 7 duplicate copies of the target range of cells in the first tab as opposed to one copy of the target range of cells for each different individual tab. There are 7 tabs in total in the workbook, so I am guessing that the macro is looping the print dialog 7 times for a single tab. Any help would be greatly appreciated
Code:
Sub PrintQC()
Dim book As Workbook
Dim sheet As Worksheet
Dim text As String
Set book = ActiveWorkbook
For Each sheet In book.ActiveSheet
Range("A1:F23").Select
ActiveSheet.PageSetup.PrintArea = "A1:F23"
ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1, Collate _
:=True
Next sheet
End
End Sub