Printing a wide range

Pauljj

Well-known Member
Joined
Mar 28, 2004
Messages
2,047
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
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
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
 
Upvote 0
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
 
Upvote 0
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
 
Upvote 0

Forum statistics

Threads
1,214,821
Messages
6,121,759
Members
449,048
Latest member
excelknuckles

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