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

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type

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
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,181,790
Messages
5,932,056
Members
436,816
Latest member
Composh

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