Remove Page Break Lines In All Workbooks

less than 1 minute read

Loop through each sheet in all open workbooks and remove the page break lines

Sub DisablePageBreaks()
    '// vars
    Dim Wb          As Workbook
    Dim Sht         As Worksheet
    '// optimise
    Application.ScreenUpdating = FALSE
    '// loop thruogh sheets and hide page breaks
    For Each Wb In Application.Workbooks
        For Each Sht In WB.Worksheets
            Sht.DisplayPageBreaks = FALSE
        Next Sht
    Next Wb
    Application.ScreenUpdating = TRUE
End Sub