Setting Print Layout Width with VBA

boonwd

New Member
Joined
Jul 21, 2015
Messages
10
Hi All,
i'm attempting to automate a print-to-pdf process from within a change-order cost-estimating workbook. i've managed to work it all the way through selecting sheets based on a cell value, hiding blank rows on those sheets and generating the finished document. at issue is the process of forcing the selected sheets to print in a one-page wide width. unless i go through the workbook and set the print properties for each sheet, they wind up printing across and down and not one page wide as preferred. i've found and tried numerous "ActiveSheet.PageSetup..." procedures and none seem to simply force the one-page width without changing the page layout scale to some small unusable number. the code I have is mostly found on the web so I didn't want to post it as mine. thanks in advance...
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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