Reputation: 69
This is what I have:
Sub Page_Break()
For i = 1 To 799 Step 30
ActiveSheet.HPageBreaks.Add Before:=Cells(i + 1, 1)
Next
End Sub
Upvotes: 0
Views: 184
Reputation: 5721
Do the For like this:
For i = 30 To 799 Step 30
The rest of the code is fine, unless you have merged cells and other complicating stuff.
Upvotes: 1