VBA Display Page Breaks Setting

Associated Files Download Links

One way to speed up your VBA code is to disable displaying page breaks by changing the DisplayPageBreaks. Changing this setting won’t always have an impact. It should only matter if (From Microsoft):

  • You’ve previously set a PageSetup property for the relevant worksheet and your VBA procedure modifies the properties of many rows or columns
  • OR Your VBA procedure forces Excel to calculate pagebreaks (displaying Print Preview or modifying any properties of PageSetup).

To disable displaying page breaks set the DisplayPageBreaks property to false:

You can turn DisplayPageBreaks back on by setting the property to true:

Note that the DisplayPageBreaks setting must be set for each individual worksheet. To disable displaying page breaks for all worksheets in a workbook: