Changing Default Printer Preferences from VBA

Rhadida

Board Regular
Joined
Nov 26, 2003
Messages
159
I was wondering if it is possible to change the Default Printer Preferences (e.g. Landscape/Portrait). Or to force Excel to print Landscape/Portrait?

I am trying to figure out a way to print a Userfrom in Landscape, but I can't seem to find any solotion to the problem. Anyone got some new information on the subject?
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.

SydneyGeek

MrExcel MVP
Joined
Aug 5, 2003
Messages
12,251
You could use

ActiveSheet.PageSetup.Orientation = xlLandscape or
ActiveSheet.PageSetup.Orientation = xlPortrait

as required

Denis
 

Rhadida

Board Regular
Joined
Nov 26, 2003
Messages
159
The ActiveSheet option only changes the print format to Landscape when printing Sheets, unfortunately it doesn't apply to printing Userform.

Anymore suggestions? Perhaps a change in the VB settings?
 

SydneyGeek

MrExcel MVP
Joined
Aug 5, 2003
Messages
12,251
How often will you be printing the form? If not often, maybe you can select the form, Ctrl + Print Screen and paste to a blank worksheet (or to Word). Then you can set the orientation.

Just a thought...

Denis
 

Rhadida

Board Regular
Joined
Nov 26, 2003
Messages
159

ADVERTISEMENT

The printform function is used to print a Userform with data a User has selected. So people will be using the press on a button to print the form. they don't have any knowledge of excel, so I was looking for a Print option to Landscape, so the form will fit on the page :)

But thanks for your input.


Does anyone perhaps know if an add-in could be created to set the printer defaults?
 

Forum statistics

Threads
1,148,530
Messages
5,747,234
Members
424,070
Latest member
smanni3

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