Code for inserting a blank page for odd numbered worksheets

Milos

Board Regular
Joined
Aug 28, 2016
Messages
121
Office Version
  1. 365
Platform
  1. Windows
Hi all,

I am looking for a solution to a problem that has plagued me for a while.

I want to insert a new page break/ new blank page to ensure that all of the pages that will print are even (e.g. 2,4,6,8) for any given worksheet in a workbook.


e.g. If:

[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Sheet 1
[/TD]
[TD]Sheet 2
[/TD]
[TD]Sheet 3
[/TD]
[TD]Sheet 4
[/TD]
[TD]Sheet 5
[/TD]
[/TR]
[TR]
[TD]1 page
[/TD]
[TD]2 pages
[/TD]
[TD]3 pages
[/TD]
[TD]4 pages
[/TD]
[TD]5 pages
[/TD]
[/TR]
</tbody>[/TABLE]


THEN:

[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Sheet 1
[/TD]
[TD]Sheet 2
[/TD]
[TD]Sheet 3
[/TD]
[TD]Sheet 4
[/TD]
[TD]Sheet 5
[/TD]
[/TR]
[TR]
[TD]2 pages
[/TD]
[TD]2 pages
[/TD]
[TD]4 pages
[/TD]
[TD]4 pages
[/TD]
[TD]6 pages
[/TD]
[/TR]
</tbody>[/TABLE]


If anybody knows how I would code this your help would be greatly appreciated!

Thanks
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Hi!

My first suggestion -as i guess you select all sheets then print-:
select a sheet, then print; select next one then print; so on
Sample:
Code:
Sub Milos_print()
Application.ScreenUpdating = False
Do
sc = sc + 1
Sheets(sc).Select
ActiveSheet.PrintOut Copies:=1, Collate:=True, IgnorePrintAreas:=False
Loop Until sc = Sheets.Count
MsgBox ("Done")
End Sub
It will be a lil slower than selecting all the sheets, then sending to the printer
 
Upvote 0

Forum statistics

Threads
1,223,896
Messages
6,175,260
Members
452,627
Latest member
KitkatToby

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top