Hi, I hope this is simple, but a couple of hours of web searches have been less than completely useful.

I am printing family tree diagrams. I have determined by trial and error (MANY errors) that I can build no more than three generations on a sheet before the format forces creation of a second worksheet page that contains the overflow. I am trying to make this application not do that. I want to be able to put a page number at the bottom of whatever is printed and NOT print an extra sheet because of the overflow data, which is why the format I described. So I build my pages in VBA with the three-generation format.

My current problem started when my sheets ended up showing thin but not invisible grid lines, I'm guessing the smallest possible line thickness and 50% gray(?) because that is the color used for graph gridlines by default - but the actual color is immaterial. It is more that the color is not transparent or white.

So in an attempt to prevent the gridlines from showing up, I went through and told Excel to set all of the gridlines in a given range ("A1:J34" in this case) to be vbWhite. That range is an APPROXIMATE guess at the area on the sheet that would fit on one page. All of the cells.Interior.Color were set to vbWhite as well, and the .Value for the entire range was set to "" - the idea being that I would have a totally blank canvas. Then I went back and filled in the stuff I wanted. The "filling in" part IS working.

The problem came up that I have to use AutoFill on the columns that have names in them. Some names are simple, like "Susan Smith" but others are much longer, like "Margarita Esperanza Espinoza" (both fictitious names). So what happens is that the page breaks on each sheet occur based on the lengths of the longest names in the boxes in the A, C, and E columns, and that varies from one sheet to the next. I actually will never have anything to print beyond range "A1:G32" on any sheet but I wanted to get rid of the gridlines in the unused areas. Unfortunately, the fact that I erased that range appears to make Excel think I have something there and that triggers an extra page for the "overflow" even though it is totally blank. Sometimes it appears that it is the last erased column ("J") that overflows. Sometimes "K" (which is NOT blanked out) slides in on the sheet and I get the gridlines anyway, because maybe on that page only two generations were left to be displayed, so the other columns, when I apply Autofit, really shrink down. Between blank pages and the occasional gridlines that appear on the edge of each sheet, I find myself having to manually resize every flippin' page. I was automating this process in the first place so as to NOT have to go back and touch it up because that is time-consuming.

Either of two answers would work for me. I need the answer in VBA terms because I'm automating the family tree generator for members of my family to be able to ask for a tree specific to each person. (If it works right and I don't need to go back and manually retouch the pages, the code takes 6.3 to 8.3 seconds to run for an entire family tree for one person.)

Option A: Tell Excel to turn off ALL of its gridlines in a way that will not show up when printing, but in a way that doesn't "touch" the cells so that Excel thinks the cells were "busy" and wants to print them anyway.

Option B: On any given page, tell Excel not to print anything beyond range "A1:G32" - no overflow pages desired or required. I.e. "A1:G32" is THE ONLY print area for the given sheet, no matter how many cells I actually blank out.

Sorry if this got a bit long-winded, but that is the way I am. I wanted to give a good explanation of what is going wrong.