LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Cell invisible when printed.

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" wrote in message
...
Is there a way to have a cell visible on screen but invisible when
printed?



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to show date printed, updated only when worksheet printed? Sam Excel Discussion (Misc queries) 4 April 4th 23 10:49 AM
Selected Cell Shading is invisible. Zarrar Janjua Setting up and Configuration of Excel 4 May 23rd 07 03:15 AM
Render the contents of a cell invisible [email protected] Excel Programming 8 December 26th 06 05:06 AM
Invisible Text designation in cell? mshanaha Excel Worksheet Functions 0 June 30th 05 05:01 PM
What is invisible in a cell?l Kanga 85 Excel Worksheet Functions 4 February 23rd 05 07:49 PM


All times are GMT +1. The time now is 09:27 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"