I am running an access 97 database. I am getting a server exception error on the line .HPage breaks.add Before:ActiveCell. Highlighted in Blue. Any help would be appreciated.
Code:
' *** ADD PAGE BREAK
If Not rst.EOF Then
If (iPageBreakCount = 2) Then
With goXL.Sheets("Executive Summary")
.Cells(iRow, 1).Select
[Blue] .HPageBreaks.Add Before:=ActiveCell [/Blue]
End With
iPageBreakCount = 0
End If
End If
Next Z
End If
rst.Close
Set rst = Nothing