PC Review


Reply
Thread Tools Rate Thread

Cell invisible when printed.

 
 
Jim
Guest
Posts: n/a
 
      18th Jul 2008
Is there a way to have a cell visible on screen but invisible when
printed?
 
Reply With Quote
 
 
 
 
Peter T
Guest
Posts: n/a
 
      18th Jul 2008
Here's one approach -

Format the font colour in cells you want to print non-visible with say
color-index 56. That's the almost black colour on the top right of the 40/56
colour palette.

' In the Thisworkbook module

Private Sub Workbook_BeforePrint(Cancel As Boolean)
Dim origClr As Long

origClr = ThisWorkbook.Colors(56)
ThisWorkbook.Colors(56) = RGB(255, 255, 255) ' white

Application.OnTime Now, "'reSetPrintClr " & origClr & "' "
End Sub

' In a normal module

Sub reSetPrintClr(nClr As Long)
ThisWorkbook.Colors(56) = nClr
End Sub


If you want some other palette colour, record a macro while applying some
format with your colour, the colorindex will be recorded. As written, cells
on white backgrounds will be hidden whilst printed. For testing without
printing, activate the print dialog (File, print), have a look, then abort
the print

Come back if your not sure of the difference between "Thisworkbook" and
"normal" modules.

Regards,
Peter T


"Jim" <(E-Mail Removed)> wrote in message
news:6416c721-17fc-449a-a70d-(E-Mail Removed)...
> Is there a way to have a cell visible on screen but invisible when
> printed?



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Selected Cell Shading is invisible. =?Utf-8?B?WmFycmFyIEphbmp1YQ==?= Microsoft Excel Setup 4 23rd May 2007 03:15 AM
Make one cell in gridview invisible? Jo Microsoft ASP .NET 11 10th Apr 2006 07:44 AM
Image visible on the screen, but invisible when document printed? =?Utf-8?B?YWRlc3ZpZ25lc2s=?= Microsoft Word Document Management 1 7th Nov 2005 05:25 PM
Invisible Text designation in cell? =?Utf-8?B?bXNoYW5haGE=?= Microsoft Excel Worksheet Functions 0 30th Jun 2005 05:01 PM
What is invisible in a cell?l =?Utf-8?B?S2FuZ2EgODU=?= Microsoft Excel Worksheet Functions 4 23rd Feb 2005 07:49 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:14 PM.