I don't know about you but I am tired of always having to change my spreadsheet to a landscape orientation before printing. Personally, I think Microsoft should have made the default oreientation landscape. Anyway, I have been trying to play around and use macros so I decided to just write a macro to do it for me. This is a simple macro - all it does is change the print orientation to Landscape.
The green is just information for the user and is not part of the actual macro.
To access the Developer tab where all the macro features exist, in Excel 2010, you need to:
- Click on File>Options
- Select Customize Ribbon
- Select Developer
- Click OK
- Copy the code below
- Click on the Visual Basic icon (or press Alt+F11)
- Click Insert>Module
- A blank window will display
- Click Edit>Paste
- You can run it to test it or debug it if you wish
- Click File>Close and Return to Excel
- Click the Macros icon
- From there you can edit it, run it, or click on Options to create a shortcut key.
Sub Landscape_Printing()
'
' Landscape_Printing Macro
' This macro changes the print setting to landscape.
'
' Application.PrintCommunication = False
With ActiveSheet.PageSetup
.Orientation = xlLandscape
End With
Application.PrintCommunication = True
End Sub