Printing a wide range

Pauljj

Well-known Member
Joined
Mar 28, 2004
Messages
2,013
I need to print a wide range, ie A1:Z33, this is obviously doable but makes the appearance on a landscape A4 sheet appear very small, so my though was ....

Could I print A1:S33 at the top of my A4 page and then T1:Z33 below it ?

Is there anyway of setting this up in VB..


Any ideas please

Thanks

Paul
 

Some videos you may like

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand

VoG

Legend
Joined
Jun 19, 2002
Messages
63,650
Try

Code:
Sub Testprint()
Dim ws1 As Worksheet, ws2 As Worksheet
Application.ScreenUpdating = False
Set ws1 = ActiveSheet
Set ws2 = Sheets.Add
ws1.Range("A1:S33").Copy Destination:=ws2.Range("A1")
ws1.Range("T1:Z33").Copy Destination:=ws2.Range("A35")
With ws2.PageSetup
    .Orientation = xlLandscape
    .Zoom = False
    .FitToPagesWide = 1
    .FitToPagesTall = 1
End With
ws2.PrintOut
Application.DisplayAlerts = False
ws2.Delete
Application.DisplayAlerts = True
Application.ScreenUpdating = True
End Sub
 

Pauljj

Well-known Member
Joined
Mar 28, 2004
Messages
2,013
Thats an impressive bit of code, can I check with one thing, is there a way of copying the column widths to ws2 as my print has a couple of things squashed together
 

VoG

Legend
Joined
Jun 19, 2002
Messages
63,650
Try this:

Code:
Sub Testprint()
Dim ws1 As Worksheet, ws2 As Worksheet
Application.ScreenUpdating = False
Set ws1 = ActiveSheet
Set ws2 = Sheets.Add
ws1.Range("A1:S33").Copy Destination:=ws2.Range("A1")
ws1.Range("T1:Z33").Copy Destination:=ws2.Range("A35")
ws1.Range("A1:S1").Copy
ws2.Range("A1:S1").PasteSpecial Paste:=xlPasteColumnWidths
With ws2.PageSetup
    .Orientation = xlLandscape
    .Zoom = False
    .FitToPagesWide = 1
    .FitToPagesTall = 1
End With
ws2.PrintOut
Application.DisplayAlerts = False
ws2.Delete
Application.DisplayAlerts = True
Application.ScreenUpdating = True
End Sub
 

Watch MrExcel Video

Forum statistics

Threads
1,123,318
Messages
5,600,923
Members
414,416
Latest member
Nobu

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
Top