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

CodeFunctionName
What is this?

Public

Tested

Original 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 716

Downloads 246

CodeID
DB ID

ANmarAmdeen
626
Attachments
Revisions

v1.0

Wednesday
February
24
2021