Not all recorded macros are re-usable. This print selection one is.
Tag Archives: printing
Page Breaks in Excel
Turn them off
When you set your print area or use the Page Break Preview View, Excel will show you the page breaks on the grid. If this annoys or distracts you, here is how to remove them.
It’s a one-line macro that turns off the page breaks in the current sheet.
Sub TurnOffPageBreaks() ActiveSheet.DisplayPageBreaks = False End Sub |
If you are new to macros then this blog post can take you through how to use them.
The above code can be copied and pasted into the code window.
If you want to turn page breaks off for all the sheets in the file use the code below.
Sub TurnOffAllPageBreaks() Dim ws For Each ws In Worksheets ws.DisplayPageBreaks = False Next ws End Sub |
I hope these code snippets are useful.
Expand to Fit to One Page in Excel
Macro solution
Excel will automatically decrease the print zoom % to fit to one page, but it won’t increase the zoom % to fit to one page. E.g. if you want to print on A3 instead of A4. I had a request to do this, so I wrote a macro to do it.
Excel VBA to Clear Manual Page Breaks
Be careful how you do it
When clearing page breaks in Excel VBA you need to be careful. There is one command that will clear page breaks but it will also affect other print settings.
Excel and pdf
Creating a pdf from a single sheet
In Excel you can us Save As to save a file as a pdf, but it isn’t quite as effective in Excel as it is for MS Word. Often you only want to save a single sheet or a few sheets to pdf. Try this.
Excel VBA BeforePrint Issue
Not all Print Previews are Equal
Excel has a BeforePrint event which enables you run VBA code before a document is printed. This event can also be triggered by Print Preview. But not all Print Previews are the same.
How Not to Print an Image in Excel
If you want to place graphic objects on your sheet eg logos and checkboxes, but not have them print out, you need to change their properties.
Where is Print Selection in Excel?
Find out where it moved to
In a recent training session I had a question about where the Print Selection option is in the new Excel versions.
Printing in Excel
Some tips and tricks
It is easy to print things from Word. It is not so easy in Excel. Excel has this huge grid and if you don’t tell Excel otherwise, it will print everything on the sheet, whether you want it to or not.
Excel Templates – Why and How to Use Them
Save time and effort
Templates allow you to create blank sheets and blank workbooks that have customised formats as well as customised Page Setup settings, including headers and footers.
Print just the first page in Outlook [VIDEO]
Save paper and time
If I print emails I typically only want the first page. To do that in Outlook takes a few clicks each time.
Printing certain sheets in an Excel file
Speed up printing
If you need to print certain sheets in a file in one step you can set up a macro to do it automatically and flexibly.
Excel’s Print Options
Get printing right the first time
Printing in Excel can be a tricky exercise. Both Word and PowerPoint basically don’t let you print outside the page, but each Excel sheet has a huge grid with over 17 billion individual cells. Printing large spreadsheets can be a challenge.