xl97 delete phantom pgBreaks in VBA?
Hello,
I was using an example in the Excel97 help files for
looping through a pagebreak collection, but the loop
didn't work.
For Each pb in Worksheets(1).HPageBreaks
...
Next
bombs out right at "For Each pb..." even though I do have
pagebreaks in the worksheet. So I used a For..Next loop.
This was a little better. But if I have 2 pagebreaks that
I did insert, the sht.hpagebreak.count says like 6. So I
loop through the collection and I see a location for
phantom pagebreaks which I cannot remove/delete in VBA. I
did this for several sheets in one workbook and got
different locations for these phantom pagebreaks. Is this
a bug in Excle97 or is there a way to deal with these
underlying pagebreaks? Some obscure Excel constant
maybe? workbook configuration? Any suggestions
appreciated.
Thanks,
Rich
|