excel 2007 vba: how to refer to HPageBreaks

Posted by notnot on Stack Overflow See other posts from Stack Overflow or by notnot
Published on 2010-03-29T20:21:15Z Indexed on 2010/03/29 20:23 UTC
Read the original article Hit count: 406

Filed under:
|
|

I'm trying to write a macro which can look into the list of horizontal page breaks that a worksheet keeps, and it seems like HPageBreaks should be exactly that. I can add or remove page breaks from it, but I can't seem to isolate the collection itself to look at its contents. Even adding a watch and looking at ActiveSheet.HPageBreaks just brings up a generic looking object with a count field equal to 0 regardless of existing page breaks.

I'm really confused about this now. Is there any way to look into the existing page breaks within a sheet? A listing of what rows they occur on/between would be great.

© Stack Overflow or respective owner

Related posts about excel

Related posts about excel-vba