Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel - Automatically create page breaks on my landscape report

Status
Not open for further replies.

chriscboy

Programmer
Apr 23, 2002
150
GB
Hi,

I have a spreadsheet that gets created via automation from Visual Foxpro. I would like to be able to add the facility to automatically add page breaks before the spreadsheet gets printed.

The spreadsheet itself is always 1 page wide and is printed in landscape mode.

The row data contains a cell which has quite descriptive information in. The cell could contain up-to 20 lines of text. If no proper page breaks are set this information will get cut-off (ie half the info at bottom of page, rest of info appearing at the top of next page) during printing. What I want to be able to do is set page breaks so these rows with lots of text in will always get printed on the following page, rather than being cut-off.

Can someone point me in the write direction please? Any VBA snippets would be much appreciated!
 
Have a look at the PageBreak property of the Excel.Range object.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top