How to clear print area through multiple sheets at once in Excel?
In some cases, we may set a print area in a worksheet for printing, but if there are multiple sheets with different print areas, how can I clear all print areas through multiple sheets at once in Excel? Manually deleting one by one is a slow way, is there any quick way?
Here is a macro code that can clear all print areas through the entire workbook.
1. Press Alt + F11 keys to enable the Microsoft Visual Basic for Applications window.
2. In the Project – VBAProject pane, double click ThisWorkbook and copy below VBA and paste them into the right blank script. See screenshot:
VBA: Clear print area entire workbook
Sub ClearPrintArea() 'UpdatebyExtendoffice20171229 Dim xSheet As Worksheet For Each xSheet In Worksheets xSheet.PageSetup.PrintArea = "" Next End Sub
3. Press F5 key to run the code, then all print areas in the workbook have been removed.
If you have Kutools for Excel, its Copy Page Setup utility also can do you a favor on clearing multiple print areas through sheets.
|Kutools for Excel, with more than 120 handy functions, makes your jobs easier.|
After installing Kutools for Excel, please do as below:（Free Download Kutools for Excel Now!)
1. Select one sheet, for instance, sheet random password, and then click Page Layout > Print Area > Clear Print Area. See screenshot:
2. Then click Enterprise > Printing > Copy Page Setup.
3. Then in the Copy Page Setup dialog,
in the Copy to section, all sheets except the current sheet are listing, please check the sheets you want to clear the print area from;
then go to the Options section, under Sheet list, check the Print area option only. See screenshot:
4. Click Ok. Now the print areas are removed from the selected sheets.