print areas on different worksheets printed together

anon125

Active Member
Joined
Feb 14, 2008
Messages
392
I have an ancient version of excel. excel 2002
i can do a calculation in this case a mortgage.
ctrl click i can dupicate it to another worksheet.
do this 20 times and i have 21 worksheets.
alter each one to make it another scenario.
can i make the print area, the area on each of the worksheets- all on one print out?
thanks all
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
Try this macro, which shows the print preview and asks if you want to print (to the default printer).
VBA Code:
Public Sub Print_All_Print_Areas_Together()

    Dim printSheet As Worksheet
    Dim destCell As Range
    Dim ws As Worksheet
    Dim printAreaRange As Range
   
    Set printSheet = ActiveWorkbook.Worksheets.Add(After:=ActiveWorkbook.Worksheets(ActiveWorkbook.Worksheets.Count))
    Set destCell = printSheet.Range("A1")
   
    For Each ws In ActiveWorkbook.Worksheets
        If ws.PageSetup.PrintArea <> "" Then
            Set printAreaRange = ws.Range(ws.PageSetup.PrintArea)
            printAreaRange.Copy destCell
            Set destCell = destCell.Offset(printAreaRange.Rows.Count)
            printSheet.HPageBreaks.Add Before:=destCell
        End If
    Next
   
    printSheet.PrintPreview
    If MsgBox("Print?", vbYesNo) = vbYes Then printSheet.PrintOut

    Application.DisplayAlerts = False
    printSheet.Delete
    Application.DisplayAlerts = True
   
End Sub
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,622
Messages
6,120,580
Members
448,972
Latest member
Shantanu2024

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