This blew up for me on the 1028th pagebreak:
Option Explicit
Sub testme()
Dim iCtr As Long
With ActiveSheet
On Error Resume Next
For iCtr = 2 To .Rows.Count
.HPageBreaks.Add before:=.Cells(iCtr, "A")
If Err.Number = 0 Then
'ok
Else
Err.Clear
MsgBox "Error with: " & iCtr & vbLf & iCtr - 1 & " worked ok"
Exit For
End If
Next iCtr
On Error GoTo 0
End With
End Sub
ps. I used xl2003.