Forum Discussion
ChrisBShep
Sep 06, 2023Copper Contributor
hide print area for whole workbook
Excel (Office Pro+ 2016) has randomly started showing the print area in every worksheet in every workbook.
The only method I've found to hide them again involves File - Options - Hide Page Breaks, but this has to be done sheet by sheet. I have many workbooks and many many sheets in each... this is not a solution. Especially as they reappear again randomly...
Any ideas on a better solution?
- JKPieterseSilver Contributor
ChrisBShep They re-appear anytime you access print features for a sheet such as print preview (not sure what else triggers it). This macro clears them from the activeworkbook (all worksheets):
Sub StopShowingPagbreaks() Dim sh As Worksheet For Each sh In ActiveWorkbook.Worksheets sh.DisplayPageBreaks = False Next End Sub
- ChrisBShepCopper ContributorHi Jan,
Thanks for your reply. I've no idea why it's suddenly started happening, as I'm not doing anything differently, and am not accessing print features.
I'm aware of the macro workaround, but that would mean converting xlsx to xlsm (all my workbooks) and this will cause issues when sharing by email (given my company's hyper-active IT security). It's not really a long-term solution, but thanks any way...- JKPieterseSilver ContributorI just wanted to share the macro in case you needed a quick fix for any workbook open at that moment.