F
F*SH
Hi again
I've got a page that has lots of charts on it, stacked above each other
vertically. When I want to print the page, Excel has a habit of cutting
the occasional unlucky graph in half
So, to help stop this needless charticide, I want to add some page
breaks. Specifically, one after every 8 charts. This I thought would be
easy when I saw the HPageBreaks property. Great, I thought, after every
8th chart I'll just add one of these with
Code:
--------------------
ActiveSheet.HPageBreaks.Add After:=ActiveChart
--------------------
Naturally, it wasn't so cooperative, and gave me big, unrecoverable
errors. Any idea why? Presumably it's because it wants a cell, rather
than an object, as a location reference. Which suggests another way -
is there any way to determine the row onwhich the chart's lower edge
can be found? Then I could add a pagebreak to a cell on this row, which
will probably be more agreeable to VB.
Thanks.
I've got a page that has lots of charts on it, stacked above each other
vertically. When I want to print the page, Excel has a habit of cutting
the occasional unlucky graph in half

So, to help stop this needless charticide, I want to add some page
breaks. Specifically, one after every 8 charts. This I thought would be
easy when I saw the HPageBreaks property. Great, I thought, after every
8th chart I'll just add one of these with
Code:
--------------------
ActiveSheet.HPageBreaks.Add After:=ActiveChart
--------------------
Naturally, it wasn't so cooperative, and gave me big, unrecoverable
errors. Any idea why? Presumably it's because it wants a cell, rather
than an object, as a location reference. Which suggests another way -
is there any way to determine the row onwhich the chart's lower edge
can be found? Then I could add a pagebreak to a cell on this row, which
will probably be more agreeable to VB.
Thanks.