Nov 11 2020 08:31 AM
Every time I lock my computer and disconnect from my external monitors with an Excel file open, page breaks are displayed on each tab when I reopen my computer. I have to manually remove them from each tab in Excel Options / Advanced - it is a real hassle. Is there a way to prevent this from happening?
Nov 11 2020 08:40 AM
Tools - Options - View checkmark 'Page break'
and if it doesn't work that way, then VBA
Copy the following VBA code into the module 'This workbook'
'Code:
Private Sub Workbook_Open ()
Dim i As Integer
For i = 1 To ThisWorkbook.Sheets.Count
Sheets (i) .DisplayAutomaticPageBreaks = True
Next i
End Sub
- Open the VBA editor with Alt + F11 - Open and activate the Project Explorer with Ctrl + R - Now mark the desired file with a double click - Double-click below this file on 'This work folder' - in the right half of the window is now the code window of 'This workbook' - insert the code there - Save and close the VBA editor with Alt + F4 - the macro will now be executed the next time the file is opened
Hope I was able to help you.
Nikolino
I know I don't know anything (Socrates)
* Kindly Mark and Vote this reply if it helps please, as it will be beneficial to more Community members reading here