ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Macro for Page Setup - Fit to one page (https://www.excelbanter.com/excel-programming/435513-macro-page-setup-fit-one-page.html)

Yogesh Gupta

Macro for Page Setup - Fit to one page
 
I am using following macro to print fit to one page. But it is not happening
and print is actually running on two pages.

With ActiveSheet.PageSetup
.PrintTitleRows = ""
.PrintTitleColumns = ""
.Orientation = xlLandscape
.LeftFooter = "Left Footer text: "
.RightFooter = "Right Footer Text: "
.FitToPagesWide = 1
.FitToPagesTall = 1
End With

Can any one help me understand the reason why I am not able to get print fit
to single page and what change do I need to make to my code.



--
Yogesh Gupta

Sam Wilson

Macro for Page Setup - Fit to one page
 
add

..zoom = false

to the other conditions within your with.

Sam

"Yogesh Gupta" wrote:

I am using following macro to print fit to one page. But it is not happening
and print is actually running on two pages.

With ActiveSheet.PageSetup
.PrintTitleRows = ""
.PrintTitleColumns = ""
.Orientation = xlLandscape
.LeftFooter = "Left Footer text: "
.RightFooter = "Right Footer Text: "
.FitToPagesWide = 1
.FitToPagesTall = 1
End With

Can any one help me understand the reason why I am not able to get print fit
to single page and what change do I need to make to my code.



--
Yogesh Gupta



All times are GMT +1. The time now is 07:30 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com