A macro that will show a cell's contents but not allow it to print
Is there a macro that will a cell's contents to be visible on the
screen, but will not allow the same to be printed? Thanks. Michael |
A macro that will show a cell's contents but not allow it to print
Hi Michael
You can use code in the beforeprint event to make the text white so you not see it on the printout Or use CF (see link on my site to Debra's site ) http://www.rondebruin.nl/print.htm#Hide You can find example code on this page -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm wrote in message ups.com... Is there a macro that will a cell's contents to be visible on the screen, but will not allow the same to be printed? Thanks. Michael |
A macro that will show a cell's contents but not allow it to print
Thanks Ron, The problem is that some printers, including my B&W laser printer, still print non-black fonts in black. Also, the fonts are wish to view are not white, but a variety of colors. |
A macro that will show a cell's contents but not allow it to p
For the OP
You can use to create the sheet. http://www.rondebruin.nl/print.htm#non-contiguous This way it will update (values and formats) when you chnage somthing -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Jim Thomlinson" wrote in message ... The only thing I can recommend in that case is to come up with a seprate worksheet just for printing. The printout sheet will be essentailly identical to the original except that it will omit the itmes you do not want printed. The sheet can be kept hidden... You will want some code to catch the print event to see if the user is trying to print the target. If so then cancel the printout and print you "print out" sheet in it's place. -- HTH... Jim Thomlinson " wrote: Thanks Ron, The problem is that some printers, including my B&W laser printer, still print non-black fonts in black. Also, the fonts are wish to view are not white, but a variety of colors. |
A macro that will show a cell's contents but not allow it to p
Thanks guys.
Michael |
A macro that will show a cell's contents but not allow it to print
Michael,
Just a thought and certianly not necessarily the best way to go (if you can implement the other suggestion of a separate printing sheet), but you can set whether errors print or not. This would mean you would need to error those cells that you do not want to print, by using/amending their formula. So if you have named cell "rngErr" somewhere suitable, then use a fomula like : =If(rngErr0,1/0,"Original Value") Private Sub Workbook_BeforePrint(Cancel As Boolean) With ActiveSheet 'Force that cells to error .Range("rngErr").Value = 1 .PageSetup.PrintErrors = xlPrintErrorsBlank Application.EnableEvents = False .PrintOut Application.EnableEvents = True 'Reset to no errors .Range("rngErr").Value = 0 'Cancel Excel's print out Cancel = True End With End Sub ....but XL2002 and up only. NickHk wrote: Is there a macro that will a cell's contents to be visible on the screen, but will not allow the same to be printed? Thanks. Michael |
A macro that will show a cell's contents but not allow it to print
Thanks Nick. Michael |
All times are GMT +1. The time now is 08:19 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com