Vertical page breaks

Change Vertical page breaks in Excel spreadsheet preparing to print
Looks like we have to access PageBreakPreview BEFORE we can change them


Public

Tested

My Own Work

ActiveWindow.View = xlPageBreakPreview
Set ActiveSheet.VPageBreaks(1).Location = Range("Z2") ' Column after the break
Set ActiveSheet.VPageBreaks(2).Location = Range("AS2") ' Column after the break
ActiveWindow.View = xlNormalView

' And to change horizontal break use HPageBreaks

Views 595 Downloads 173

VBA-Excel Print+Reports
ANmarAmdeen
813
Attachments
Revisions

v1.0