Hi again,
See if the approach used in the attached workbook does what you need.
When the workbook is opened a new temporary hidden worksheet is created. The locations of all of the horizontal page breaks on worksheet "Sheet To Be Protected" are stored in the temporary worksheet.
Before the protected worksheet is printed, all horizontal page breaks (including any inserted by the User) on the worksheet are deleted, and all (i.e. original) horizontal page breaks whose locations are stored in the temporary worksheet are restored.
When the workbook is closed, the temporary worksheet is automatically deleted.
The following code is inserted in the "ThisWorkbook" VBA CodeModule:
The following code is inserted in a standard VBA CodeModule:
The highlighted values may be changed to suit your own requirements.
Hope this helps - please let me know how you get on.
Regards,
Greg M
Bookmarks