LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 63
Default Set certain cells to print and others not to print


What about setting the ink colour the same as the background before
printing, then restore after printing?
This assumes a white background and uniform cell formatting:

Sub SelectivePrint()
Dim R As Range

'select the target sheet
Sheets("Sheet1").Select
'Create a range object containing the cells which are not to print
Set R = Application.Union(Range("a4:a5"), _
Range("b8:b8"), Range("c9:c10"), _
Range("D8"))
'set the ink colour to match the background (white in this case)
R.Font.ColorIndex = 19
'print one copy of the sheet
ActiveWindow.SelectedSheets.PrintOut , , 1
'restore the automatic colour
R.Font.ColorIndex = 0
End Sub



"xp" wrote in message
...
I am working on a form in XL2007.

The form consumes one 8.5 by 11 page.

I would like to set certain cells to be visible on screen, but not print
their contents. This would need to be done almost on a cell by cell basis.

Is
something like this possible?

Thanks!



 
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
getting cells to show on print preview & print out Lulu Excel Discussion (Misc queries) 2 July 15th 09 10:28 PM
How can I set some cells to not print w/o changing print layout? HMS Excel Discussion (Misc queries) 1 January 9th 09 04:44 PM
Print worksheet but dont want two cells too print is it possible pano[_3_] Excel Programming 9 October 21st 07 02:25 PM
How can I print current row in same place on paper but not print surrounding cells??? Andy Ford New Users to Excel 1 September 2nd 05 05:50 AM
print view & print, in excel, different size cells buddyorliz Excel Discussion (Misc queries) 3 September 1st 05 01:20 PM


All times are GMT +1. The time now is 02:38 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"