In Excel 97 it is a property of a worksheet object called HPageBreak.
Excerpt from Excel 97 VB Help on HPageBreak:
Represents a horizontal page break. The HPageBreak object is a member of
the HPageBreaks collection. Using the HPageBreak Object: Use
HPageBreaks(index), where index is the index number of the page break, to
return an HPageBreak object. The following example changes the location
of horizontal page break one. Worksheets(1).HPageBreaks(1).Location =
Worksheets(1).Range("e5")
Does anyone know where this equivalent is in Excel 95?
-------------------==== Posted via Deja News ====-----------------------
http://www.dejanews.com/ Search, Read, Post to Usenet
The PageBreak object is new to Excel 97 and does not exist in Excel 95.
Instead, you can use the PageBreak property of the Range object, if you
are trying to set or remove manual page breaks, you can use:
Range("E5").PageBreak = xlManual
Range("E5").PageBreak = xlNone
You can test for page breaks with something like the following:
x = ActiveCell.EntireRow.PageBreak
y = ActiveCell.EntireColumn.PageBreak
If x = xlManual And y = xlManual Then
MsgBox "Manual Page Break"
End If
Hope this helps,
John Green
Sydney
Australia
Microsoft MVP - Excel