ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Automatically keeping cells together when printed. (https://www.excelbanter.com/excel-programming/381662-automatically-keeping-cells-together-when-printed.html)

Jeremy

Automatically keeping cells together when printed.
 
Is there an option (or a simple programmatic way) to give a group of
cells an attribute that will force them to stay on the same page when
printed?

I have a sheet that essentially works as two print areas, side by side.
The first part is a data entry area, and because of the way the entry
works, I have that one all set. The second part, however, is generated
by a script that reads the data entry fields, passes the values to some
objects, and generates a report. The report varies in size and shape,
but if possible, I would like to make it so that certain parts of it
are not allowed to break across pages. The script already formats the
cells, so if there was a formatting attribute I could set, that would
be ideal. I can't find one, though. Does anyone have any other ideas?


Jeremy

Automatically keeping cells together when printed.
 
Giving this another shot.

It seems to me that, if there's not a sneaky way to store some kind of
readable attribute in the cells, I'm stuck either having the script
figure out which parts of the report are headings based on the
formatting or...well, I can't think of anything else that will give me
what I want. Adding a name to the cells would work in theory, but this
sheet is going to be copied literally hundreds of times, and I don't
want that many local names floating around in the workbook.

Any other ideas on a range property that is easy to set and retrieve,
unobtrusive, and won't interfere with the way the information looks?

Jeremy wrote:
Is there an option (or a simple programmatic way) to give a group of
cells an attribute that will force them to stay on the same page when
printed?

I have a sheet that essentially works as two print areas, side by side.
The first part is a data entry area, and because of the way the entry
works, I have that one all set. The second part, however, is generated
by a script that reads the data entry fields, passes the values to some
objects, and generates a report. The report varies in size and shape,
but if possible, I would like to make it so that certain parts of it
are not allowed to break across pages. The script already formats the
cells, so if there was a formatting attribute I could set, that would
be ideal. I can't find one, though. Does anyone have any other ideas?




All times are GMT +1. The time now is 05:35 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com