philfer
11-10-2008, 07:11 AM
Hello,
I am writing a print macro in an excel workbook.
However the amount of information can grow and contract so I am trying to write some code to build in page breaks.
If I was doing this manually I would view it in page break mode and move the page breaks up and down depending if certain lines straddle a page break or not.
If I record this macro it simply puts the page breaks where I have set them in VBA code.
Is there a way to see if a paragraph or set of lines in a worksheet straddle where a page break would be and then move the breaks as necessary.
This seems like a big ask but it would be great if it could be cracked
Thanks
Phil
I am writing a print macro in an excel workbook.
However the amount of information can grow and contract so I am trying to write some code to build in page breaks.
If I was doing this manually I would view it in page break mode and move the page breaks up and down depending if certain lines straddle a page break or not.
If I record this macro it simply puts the page breaks where I have set them in VBA code.
Is there a way to see if a paragraph or set of lines in a worksheet straddle where a page break would be and then move the breaks as necessary.
This seems like a big ask but it would be great if it could be cracked
Thanks
Phil