Finding the current "print range"

A

Alex T

Folks

I am trying to build a function that would take as parameter a single
cell and would return a range corresponding to the area that would
print on the same page than the said cell.
I know that recent XL versions have a "page break preview" mode that
does everything I'm looking for... but it doesn't seem to be
accessible from the object model.

Any idea ? I'm pretty sure this is a common question...

Regards

--alexT
 
J

Jim Rech

I'm pretty sure this is a common question...

Not at all, you may be the first astonishingly enough. I guess you'd have
to find all the pagebreaks, horizontal and vertical and see where your cell
falls in. This could get real tricky if you have a multi-area print_area
and especially any partial page breaks.

--
Jim Rech
Excel MVP
| Folks
|
| I am trying to build a function that would take as parameter a single
| cell and would return a range corresponding to the area that would
| print on the same page than the said cell.
| I know that recent XL versions have a "page break preview" mode that
| does everything I'm looking for... but it doesn't seem to be
| accessible from the object model.
|
| Any idea ? I'm pretty sure this is a common question...
|
| Regards
|
| --alexT
 
Top