Excel 2010: How can we copy all the print areas from one workbook to another?
![]() |
Patch reliability is unclear, but widespread attacks make patching prudent. Go ahead and patch, but watch out for potential problems. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
-
Copy print areas
Home » Forums » AskWoody support » Productivity software by function » MS Excel and spreadsheet help » Copy print areas
- This topic has 9 replies, 2 voices, and was last updated 11 years, 4 months ago.
Viewing 8 reply threadsAuthorReplies-
Maudibe
AskWoody_MVPDecember 11, 2013 at 9:30 pm #1428228Bonriki,
This code will transfer the print area settings form the active workbook with a sheet named Source to a second workbook called Book2 that has a worksheet called Target. The second code cycles through each sheet in the workbook and transfers its print area. These codes assumes both workbooks are open and are run from the source workbook being the active book.
HTH,
MaudTransfer print area from single sheet:
Code:Public Sub TransferPrintArea() Dim wb1 As Workbook Set wb1 = Workbooks(“Book2.xlsm”) With wb1.Worksheets(“Target”) .PageSetup.PrintArea = Worksheets(“Source”).PageSetup.PrintArea End With End Sub
Transfer print area from each sheet:
Code:Public Sub TransferPrintArea() Dim wb1 As Workbook Set wb1 = Workbooks(“Book2.xlsm”) For I = 1 To Worksheets.Count wb1.Worksheets(I).PageSetup.PrintArea = Worksheets(I).PageSetup.PrintArea Next I End Sub
-
Bonriki
AskWoody Lounger -
Maudibe
AskWoody_MVPDecember 12, 2013 at 5:15 pm #1428498These codes assumes both workbooks are open and are run from the source workbook being the active book.
Bonriki,
Make sure you are looking at the source book (the file that has the print areas defined) and not the target book. Also, Make sure you are pasting the code into the source book as well.
If you are looking at the target book, it will essentially copy blank print areas and paste them on to itself. It will appear as nothing happened and that is exactly right.
-
Bonriki
AskWoody Lounger -
Maudibe
AskWoody_MVPDecember 15, 2013 at 2:17 pm #1429133Bonriki,
Attached are the 2 workbooks. Run the code from Source.xlsm. Both books must be open in the same Excel window not different ones. I have place a button to run the code in the Source.xlsm Sheet1 to make sure the right workbook is active. When the code runs, each sheet’s print areas (3 on each) in the source workbook is copied to the corresponding sheet by index in the target workbook assuming they hace the same number of sheets..
Code:Public Sub TransferPrintArea() Dim wb1 As Workbook Set wb1 = Workbooks(“Target.xlsx”) For I = 1 To Worksheets.Count wb1.Worksheets(I).PageSetup.PrintArea = Worksheets(I).PageSetup.PrintArea Next I End Sub
-
Bonriki
AskWoody LoungerDecember 15, 2013 at 5:45 pm #1429218Maud hi
I think I have got to the bottom of my problem.
I asked if I could copy print areas when I shoulkd have asked “Can I copy named ranges” instead.I have attached a screen dump of a range named “Consolidated” and part of the highlighted area.
35784-printaresMaud
I should have said the print area copy example worked fine -
Maudibe
AskWoody_MVPDecember 15, 2013 at 7:21 pm #1429241Bonriki,
If you want to copy named ranges then use the following code:
Code:Public Sub CopyRanges() For Each x In ActiveWorkbook.Names Workbooks(“Target1.xlsx”).Names.Add Name:=x.Name, RefersTo:=x.Value Next x End Sub
Note that all the ranges will appear in the target Name Manager, however, they will only apply to the sheets if the sheet name is the same
-
Bonriki
AskWoody Lounger -
Maudibe
AskWoody_MVP
Viewing 8 reply threads -

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
Proton to drop prices after ruling against “Apple tax”
by
Cybertooth
2 hours, 58 minutes ago -
24H2 Installer – don’t see Option for non destructive install
by
JP
3 hours, 24 minutes ago -
Asking Again here (New User and Fast change only backups)
by
thymej
14 hours, 19 minutes ago -
How much I spent on the Mac mini
by
Will Fastie
3 hours, 46 minutes ago -
How to get rid of Copilot in Microsoft 365
by
Lance Whitney
6 hours, 7 minutes ago -
Spring cleanup — 2025
by
Deanna McElveen
20 hours, 12 minutes ago -
Setting up Windows 11
by
Susan Bradley
3 hours, 47 minutes ago -
VLC Introduces Cutting-Edge AI Subtitling and Translation Capabilities
by
Alex5723
15 hours, 39 minutes ago -
Powershell version?
by
CWBillow
16 hours, 32 minutes ago -
SendTom Toys
by
CWBillow
48 minutes ago -
Add shortcut to taskbar?
by
CWBillow
20 hours, 28 minutes ago -
Sycophancy in GPT-4o: What happened
by
Alex5723
1 day, 12 hours ago -
How can I install Skype on Windows 7?
by
Help
1 day, 11 hours ago -
Logitech MK850 Keyboard issues
by
Rush2112
18 hours, 27 minutes ago -
We live in a simulation
by
Alex5723
2 days, 2 hours ago -
Netplwiz not working
by
RetiredGeek
1 day, 13 hours ago -
Windows 11 24H2 is broadly available
by
Alex5723
2 days, 15 hours ago -
Microsoft is killing Authenticator
by
Alex5723
1 day, 3 hours ago -
Downloads folder location
by
CWBillow
2 days, 21 hours ago -
Remove a User from Login screen
by
CWBillow
1 day, 17 hours ago -
TikTok fined €530 million for sending European user data to China
by
Nibbled To Death By Ducks
2 days, 12 hours ago -
Microsoft Speech Recognition Service Error Code 1002
by
stanhutchings
2 days, 13 hours ago -
Is it a bug or is it expected?
by
Susan Bradley
15 hours, 6 minutes ago -
Image for Windows TBwinRE image not enough space on target location
by
bobolink
2 days, 12 hours ago -
Start menu jump lists for some apps might not work as expected on Windows 10
by
Susan Bradley
1 day, 11 hours ago -
Malicious Go Modules disk-wiping malware
by
Alex5723
3 days, 1 hour ago -
Multiple Partitions?
by
CWBillow
3 days, 2 hours ago -
World Passkey Day 2025
by
Alex5723
21 minutes ago -
Add serial device in Windows 11
by
Theodore Dawson
4 days, 11 hours ago -
Windows 11 users reportedly losing data due forced BitLocker encryption
by
Alex5723
2 days, 11 hours ago
Recent blog posts
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.