ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Printing A Form (https://www.excelbanter.com/excel-programming/279172-printing-form.html)

jeffrey

Printing A Form
 
I am trying to use VBA to print an excel form. I use the
object.PrintForm method. However the form is printed in portrait mode
when I want it printed in Landscape mode. How do I get the printed
output to come out in Landscape mode? I want to be able to do this in
VBA.

Thanks.

dizzykid

Printing A Form
 
Jeffrey,

Use this line:
ActiveSheet.PageSetup.Orientation = xlLandscape

If you're interested in further fine tuning of the print job, try this:
-Tools Macro Record new macro
-FilePage set up
-set any options you want and click OK
-click the stop recording button
-now go to VBA and look over the code Excel created
Only the settings you change need to be kept, the rest can be deleted.
HTH,
Chris

"Jeffrey" wrote in message
om...
I am trying to use VBA to print an excel form. I use the
object.PrintForm method. However the form is printed in portrait mode
when I want it printed in Landscape mode. How do I get the printed
output to come out in Landscape mode? I want to be able to do this in
VBA.

Thanks.





All times are GMT +1. The time now is 06:09 PM.

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