Hiding named ranges before printing

P

PO

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
 
D

Dave Peterson

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.
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top