Printing

Kavy

Well-known Member
Joined
Jun 25, 2007
Messages
607
Hello, I am trying to make my page reduce to fit by any number of pages long but only 1 page wide.

i am using

Code:
 wsf.PageSetup.PrintArea = "A1:F" & rowf
 wsf.PageSetup.FitToPagesWide = 1
 
 
 wsf.PrintOut

Using this it still uses two pages wide, any ideas how to fix?
Thanks!
 

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

BrianB

Well-known Member
Joined
Feb 17, 2003
Messages
8,127
Try using a big number for 'tall'

eg.

Code:
        .FitToPagesWide = 1
        .FitToPagesTall = 100
 

Kavy

Well-known Member
Joined
Jun 25, 2007
Messages
607
Hey thanks for your reply,
I got it to work by first setting zoom to false!
<code>
wsf.pageSetup.zoom = false
wsf.PageSetup.PrintArea = "A1:F" & rowf
wsf.PageSetup.FitToPagesWide = 1


wsf.PrintOut
 

Forum statistics

Threads
1,181,405
Messages
5,929,756
Members
436,687
Latest member
Glass of Gin

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