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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hiding cells when printing worksheet 1

Status
Not open for further replies.

Mikey2000

MIS
Jan 11, 2002
9
US
How can I hide a cell or range of cells when printing a worksheet? I bring this up because I know in Visual Basic you can hide objects by setting the visual property to false, but I am not too familiar with VBA.
 
Hi,
You can hide formulae but not cells. If you look at Menu Item - Format/...
you see that Sheets, Rows and Columns can be Hidden...
But, alas, cells, NOT :) Skip,
metzgsk@voughtaircraft.com
 
You could, however, write a macro to cut/paste the data in the cells to another worksheet before printing and move them back after the fact. Not the prettiest method, but it could accomplish what you are after.
 
Hit Submit and thought of something else. You could change the font of the cells to match the background color, print, then change the font color back.
 
Thanks for your help. I took your advise and ended up creating a new print button that changed the font color, hid the button, printed the sheet, changed the font color back, and then made the button visible again.

It works great!
 
dsi,

Good CAN DO - OUT-OF-THE-BOX thinking ==> STAR!!! :) Skip,
metzgsk@voughtaircraft.com
 
Glad to help!

Mikey: You may not need to hide the button. If you open the properties window you will see that there is PrintObject property that you can just set to False. This will keep it displayed but will not print.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top