For some dumb reason, Excel adds dashed page breaks to all the worksheets in my document when I have two monitors in use. I wrote some code to remove these but my code only operates on the active worksheet. How can I get it to remove the page breaks on all of the worksheets?
VBA Code:
Sub RemovePageBreaks()
' Keyboard Shortcut: Ctrl+Shift+P
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
ActiveSheet.DisplayPageBreaks = False
Next ws
End Sub