Finding the current "print range"

  • Thread starter Thread starter Alex T
  • Start date Start date
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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top