Range("A65536").End(xlUp).Row
This code returns the last row in Column "A" has data making the assumption
cell A65536 is empty.
Ronald Dodge
Production Statistician
Master MOUS 2000
"Otto Moehrbach" <ot...@worldnet.att.net> wrote in message
news:OUpDxwZrBHA.1744@tkmsftngp07...
For Each pb in Worksheets(1).HPageBreaks
ProposedHPageBreakRow = pb.Location.Row
If <condition to see if this row is breaking up the group> Then
'code to determine the first row of the group that is being split up
otherwise
pb.Location = Worksheets(1).Range(<The cell reference of the first
row of the supposed splitup group otherwise>)
End If
Next
Maybe this will be of more help to you. this code will detect both
automatic and manual horizonal page breaks.
Ronald Dodge
Production Statistician
Master MOUS 2000
P.S. had to do some digging in the help files on this one.
"Otto Moehrbach" <ot...@worldnet.att.net> wrote in message
news:eGsxVSarBHA.1964@tkmsftngp07...
Likely column A has something that determines what a group is
rather than relying on which row numbers would have a new
group.
At the beginning of code Otto would probably want to remove
all preexisting manual pages breaks.
ActiveSheet.ResetAllPageBreaks
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Macros: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm
"Ronald Dodge" <ronald...@cskcorp.com> wrote in message news:OPG42parBHA.2452@tkmsftngp03...