YeaYuh
asked on
Setting the Vertical Page Break in an Excel Macro
Right now I have a workbook with several sheets in it. I run a macro that imports all data into the sheets and then highlights rows based on criteria, then it autoformats all the rows length. When this happens the Vertical Page Break gets set. I would like a way to either get rid of all the Vertical Page breaks on a sheet or how to set them all to the far right column.
Excel gave me this code when I recorded a Macro but it doesn't work in my macro, it gives me Run-time Error 1004:
ActiveSheet.VPageBreaks(1) .DragOff Direction:=xlToRight, RegionIndex:=1
Excel gave me this code when I recorded a Macro but it doesn't work in my macro, it gives me Run-time Error 1004:
ActiveSheet.VPageBreaks(1)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks