I am getting an application-definer or object-defined error on the following line:
I get the error on this line
Any suggestions why?
Code:
LastRowColB = Sheets("Printed").Range("B65536").End(xlUp).Row + 2
X = "$AE$" & LastRowColB
Sheets("Printed").Select
ActiveSheet.VPageBreaks(1).DragOff Direction:=xlToRight, RegionIndex:=1 'Sets the Page Break Preview
ActiveSheet.PageSetup.PrintArea = "$A$1" & ":" & X
I get the error on this line
Code:
ActiveSheet.VPageBreaks(1).DragOff Direction:=xlToRight, RegionIndex:=1 'Sets the Page Break Preview
Any suggestions why?