Forum Discussion
Printing all the tabs in excel separately
Hi everyone,
I'm using excel 365 version. I got the problem with my report file. The file contains multiple sheets, each sheet contains the transaction of 1 customer. When printing the report of 1 customer, the pages can be varied from 1 - 20 pages. The problem now is that when i print the entire workbook, for example, 1st report is 3 pages long, 2nd report is 2 pages long. Printing the entire workbook causing the last page of the 1st report and the first page of the 2nd report printed in the same Paper.
Now that my report has 50+ customer, is there a way to print all of these report at the same time, and each report is printed separately without being printed in the same paper with the previous report in case the previous report has a odd number of pages?
4 Replies
See if running this macro works for you:
Sub PrintSheets() Dim wsh As Worksheet For Each wsh In Worksheets wsh.PrintOut Next wsh End Sub- QTr90Copper Contributor
HansVogelaar I'm so sorry for bother again, but can you check if i wrote the marco correctly?. I'm using power query to generate the report in each sheet, and print only some particular sheets contains transactions data of these customers in a day, not the entire workbook:
Sub Printsheet()
Dim wsh As Worksheet
For Each wsh In Worksheets
If Range("A9").Value = 1 Or Range("A9").Value = "Paysend" Then
wsh.PrintOut
End If
Next wsh
End SubAlmost, but Range("A9").Value refers to the active sheet, not on wsh. Change the macro to
Sub Printsheet() Dim wsh As Worksheet For Each wsh In Worksheets If wsh.Range("A9").Value = 1 Or wsh.Range("A9").Value = "Paysend" Then wsh.PrintOut End If Next wsh End Subcell A9 on
- QTr90Copper Contributor
HansVogelaar Works perfectly.
Thank you so much!