M
manfareed
Hi,
I recorded the macro below. But when I run it I get a "subscript out of
range" message. I would welcome any suggestions.
Sub Macro1()
'
' Macro1 Macro
Sheets("Variance").Select
ActiveSheet.ResetAllPageBreaks
Set ActiveSheet.VPageBreaks(1).Location = Range("AA1")
Set ActiveSheet.HPageBreaks(2).Location = Range("A397")
Set ActiveSheet.HPageBreaks(3).Location = Range("A389")
Set ActiveSheet.HPageBreaks(2).Location = Range("A332")
Set ActiveSheet.HPageBreaks(3).Location = Range("A518")
Set ActiveSheet.HPageBreaks(4).Location = Range("A691")
Range("B882").Select
Set ActiveSheet.HPageBreaks(5).Location = Range("A859")
End Sub
I recorded the macro below. But when I run it I get a "subscript out of
range" message. I would welcome any suggestions.
Sub Macro1()
'
' Macro1 Macro
Sheets("Variance").Select
ActiveSheet.ResetAllPageBreaks
Set ActiveSheet.VPageBreaks(1).Location = Range("AA1")
Set ActiveSheet.HPageBreaks(2).Location = Range("A397")
Set ActiveSheet.HPageBreaks(3).Location = Range("A389")
Set ActiveSheet.HPageBreaks(2).Location = Range("A332")
Set ActiveSheet.HPageBreaks(3).Location = Range("A518")
Set ActiveSheet.HPageBreaks(4).Location = Range("A691")
Range("B882").Select
Set ActiveSheet.HPageBreaks(5).Location = Range("A859")
End Sub