I have a workbook with several worksheets that have multiple ranges that I print out individually, all needing different printer settings. Haven't had any problems till now.
One of the ranges required that the range print to one page. I figured out how to use FitToPages settings to get it to fit to the page and it works fine. Problem is, now everything prints to one page and I can't figure out how to turn it off. Preferably, I need a code to add to the code below that would reset the FitToPages back to normal after the printing is over. Or a code to embed in all my other printer settings to turn off the fit to page. I've tried everything my limited brain can imagine to no avail. Any help would be appreciated.
With Sheet1
Application.PrintCommunication = False
With .PageSetup
.BottomMargin = Application.InchesToPoints(0.5)
.FooterMargin = Application.InchesToPoints(0#)
.TopMargin = Application.InchesToPoints(0.5)
.HeaderMargin = Application.InchesToPoints(0#)
.LeftMargin = Application.InchesToPoints(0.25)
.RightMargin = Application.InchesToPoints(0.25)
.FitToPagesWide = 1
.FitToPagesTall = 1
.PrintArea = Sheet1.Range("BA5:BB61").Address
End With
Application.PrintCommunication = True
End With
Range("BA5", Range("BB8").End(xlDown)).PrintOut
One of the ranges required that the range print to one page. I figured out how to use FitToPages settings to get it to fit to the page and it works fine. Problem is, now everything prints to one page and I can't figure out how to turn it off. Preferably, I need a code to add to the code below that would reset the FitToPages back to normal after the printing is over. Or a code to embed in all my other printer settings to turn off the fit to page. I've tried everything my limited brain can imagine to no avail. Any help would be appreciated.
With Sheet1
Application.PrintCommunication = False
With .PageSetup
.BottomMargin = Application.InchesToPoints(0.5)
.FooterMargin = Application.InchesToPoints(0#)
.TopMargin = Application.InchesToPoints(0.5)
.HeaderMargin = Application.InchesToPoints(0#)
.LeftMargin = Application.InchesToPoints(0.25)
.RightMargin = Application.InchesToPoints(0.25)
.FitToPagesWide = 1
.FitToPagesTall = 1
.PrintArea = Sheet1.Range("BA5:BB61").Address
End With
Application.PrintCommunication = True
End With
Range("BA5", Range("BB8").End(xlDown)).PrintOut