I've repeatedly set the subject prefs, click OK, save and close an
Excel workbook/sheet, reopen it, and it doesn't show the page breaks.
What the hey? How can I set a workbook to permanently show the page
breaks?
Yes, that's quite incredible that worksheets forget the value of this
property when saved. Here's a way to work around the problem, problem that
MS should fix (maybe done in XL04, I don't have it to check).
Put the following VBA code in a new workbook, in the ThisWorkbook page
(Crtl-click on the workbook's title bar and select View Code). Save the
workbook with the name Workbook (without extension) in
Applications/Microsoft Office X/Office/Startup/Excel. Newly created
workbooks will permanently show page breaks. However existing workbooks
won't, unless this code is put in them too. Also, for the second macro
(NewSheet) to work, you must not have a workbook called Sheet saved in the
directory mentioned above.
This proposition is an all-or-nothing case. If there is one sheet in a
workbook for which you don't want line breaks to show, you can remove them
with the preferences, but they will reappear each time you open the
workbook.
JL
Mac OS X 10.3.7, Office v.X 10.1.6
' Put this code in ThisWorkbook
' Forces all page breaks to show on opening
' JL 2005-01-09
Private Sub Workbook_Open()
For Each Sh In ThisWorkbook.Sheets
Sh.DisplayPageBreaks = True
Next
End Sub
Private Sub Workbook_NewSheet(ByVal Sh As Object)
Sh.Move After:=Sheets(Sheets.Count)
Sh.DisplayPageBreaks = True
End Sub