Printing an Excel worksheet, can be adjusted manually.
In Excel 2010 and other versions of excel, printing can be adjusted by zoom in and zoom out.
In Excel 2010, to adjust page setup:
Click on "File".
Click on "Print".
Then the print preview is shown on the screen.
Under the "Custom Scaling" option, click on "Page Setup".
Click on "Adjust to" option and set the desired percentage.
See image below:
To do this via VBA or macro, it's quite straight forward.
See code below, just specify the "zoom" keyword and the value.
=========================
Sub VBA_PageSetup_Option()
With Worksheets("Sheet1")
.PageSetup.Orientation = xlLandscape
.PageSetup.Zoom = 280 '< - - - set the desired percentage
'.PrintPreview
.PrintOut
End With
End Sub
=========================
Code VBA above will zoom or adjust the whole worksheet.
If need to choose only a specific print area, then use the code below from Technet.
After setting the specific print area, zoom the area to make it bigger when the worksheet is printed.
Link to Technet:
http://msdn.microsoft.com/en-us/library/office/ff839804(v=office.15).aspx
Worksheets("Sheet1").PageSetup.PrintArea = "$A$1:$C$5"
Worksheets("Sheet1").PageSetup.Zoom = 180 'zoom to 180
Worksheets("Sheet1").PrintPreview
To test the code, setup a PDF printer in order not to waste paper and toner.
Adjust the zoom value and see the difference.
Cheers!!! Hope it helps..
Excel Keyboard shortcuts guide
https://play.google.com/store/apps/details?id=chrisjoms.myexcelapplicationguide
In Excel 2010 and other versions of excel, printing can be adjusted by zoom in and zoom out.
In Excel 2010, to adjust page setup:
Click on "File".
Click on "Print".
Then the print preview is shown on the screen.
Under the "Custom Scaling" option, click on "Page Setup".
Click on "Adjust to" option and set the desired percentage.
See image below:
To do this via VBA or macro, it's quite straight forward.
See code below, just specify the "zoom" keyword and the value.
=========================
Sub VBA_PageSetup_Option()
With Worksheets("Sheet1")
.PageSetup.Orientation = xlLandscape
.PageSetup.Zoom = 280 '< - - - set the desired percentage
'.PrintPreview
.PrintOut
End With
End Sub
=========================
Code VBA above will zoom or adjust the whole worksheet.
If need to choose only a specific print area, then use the code below from Technet.
After setting the specific print area, zoom the area to make it bigger when the worksheet is printed.
Link to Technet:
http://msdn.microsoft.com/en-us/library/office/ff839804(v=office.15).aspx
Worksheets("Sheet1").PageSetup.PrintArea = "$A$1:$C$5"
Worksheets("Sheet1").PageSetup.Zoom = 180 'zoom to 180
Worksheets("Sheet1").PrintPreview
To test the code, setup a PDF printer in order not to waste paper and toner.
Adjust the zoom value and see the difference.
Cheers!!! Hope it helps..
Excel Keyboard shortcuts guide
https://play.google.com/store/apps/details?id=chrisjoms.myexcelapplicationguide
Comments
Post a Comment