set print area for multiple sheet at the same time

romeo16

New Member
Joined
Jul 20, 2016
Messages
21
I have a file that contains 25 worksheets w/ all same formatting.
Now, I need to set the print area to A1:N58 for sheets("firstone") and set the print area to A1:N40 for sheets("secondone"). I only know how to do this for 1 worksheet (activesheet) at a time. Below is what i used.

sheets("firstone").select
sheets("firstone").Range("A1:N58").Select
ActiveSheet.PageSetup.PrintArea = "$A$1:$N$58"



How do I apply the print area to all 2 sheets at the same time and then have all 2 worksheets printed at once?
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Code:
[I]sheets("firstone").select
ActiveSheet.PageSetup.PrintArea = "$A$1:$N$58"
[/I]ActiveSheet.PrintOut
ActiveSheet.PageSetup.PrintArea = ""

[I]sheets("[/I][COLOR=#333333]secondone[/COLOR][I]").select
ActiveSheet.PageSetup.PrintArea = "$A$1:$N$40"
ActiveSheet.PrintOut
ActiveSheet.PageSetup.PrintArea = ""
[/I]
 
Last edited:
Upvote 0
Code:
[I]sheets("firstone").select
ActiveSheet.PageSetup.PrintArea = "$A$1:$N$58"
[/I]ActiveSheet.PrintOut
ActiveSheet.PageSetup.PrintArea = ""

[I]sheets("[/I][COLOR=#333333]secondone[/COLOR][I]").select
ActiveSheet.PageSetup.PrintArea = "$A$1:$N$40"
ActiveSheet.PrintOut
ActiveSheet.PageSetup.PrintArea = ""
[/I]

Thanks for your reply , unfortunately I don't want to print them out right away , I want just to see them when I go in print preview?
 
Last edited:
Upvote 0
Thanks for your reply , unfortunately I don't want to print them out right away , I want just to see them when I go in print preview?
Didn't you write "have all 2 worksheets printed at once"?


You cannot open two preview windows at once. You have to close the first preview window before the second one appears.
Code:
Sheets("DIC42").SelectActiveSheet.PageSetup.PrintArea = "$A$1:$M$3"
ActiveSheet.PrintPreview (True)
'ActiveSheet.PageSetup.PrintArea = ""

Sheets("DIC52").Select
ActiveSheet.PageSetup.PrintArea = "$A$10:$M$12"
ActiveSheet.PrintPreview ()
'ActiveSheet.PageSetup.PrintArea = ""
 
Upvote 0
You can copy the print areas to one sheet and see them in print preview.
 
Upvote 0

Forum statistics

Threads
1,214,827
Messages
6,121,803
Members
449,048
Latest member
greyangel23

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