Hiding named ranges before printing
That's the way I'd approach it.
But another alternative is to use a cell (outside the printrange). Then you
could use format|conditional formatting to change the colors.
Select all the areas
format|conditional formatting
formula is: =$x$99="hide"
and give it the hidden format.
Then you could have your print code just put "hide" in that cell, do the print,
and clearcontents of that cell.
PO wrote:
Excel 2003, sp2
Hi,
I have several named ranges in a worksheet. The user is supposed to enter
values into some of them to be used in various formulas. The cells are
formated with interior colors, borders and bold font for clarity.
I don't want the values in the named ranges to be printed though.
The printout macro I use therefore loops through the names collection and
changes the cells which are used for user-criteria interior and text color
to 16777215 (white) and changes them back after the print.
Is there a better, more direct, way to do this i.e.
ThisWorkbook.Names("Margin").[dontprintme]?
Regards
Pete
--
Dave Peterson
|