I have the following code to print a sheet:
Right now when I print it forces the entire sheet onto one page, but I only want the width to be confined to the one page and not the whole sheet.
Could someone tell me how I can add the following functions to this macro:
1. Make the width fit on one page, but not the length downwards (I would want it to print the next page with the top two rows as headers)
2. Make margins smaller on all 4 sides
2. Choose the paper size to legal
Any help is greatly appreciated! Thanks
VBA Code:
Sub Print_DB()
Dim db As Worksheet
Set db = Sheet1
Application.PrintCommunication = False
With db.PageSetup
.FitToPagesWide = 1
.PaperSize = xlPaperLetter
.Orientation = xlLandscape
End With
Application.PrintCommunication = True
Range("DBPrint").PrintPreview
End Sub
Right now when I print it forces the entire sheet onto one page, but I only want the width to be confined to the one page and not the whole sheet.
Could someone tell me how I can add the following functions to this macro:
1. Make the width fit on one page, but not the length downwards (I would want it to print the next page with the top two rows as headers)
2. Make margins smaller on all 4 sides
2. Choose the paper size to legal
Any help is greatly appreciated! Thanks