Hi, folks. I'm looking for a way to format a cell so that the cell(s) will
_display_ on the worksheet, but not _print_ when the worksheet is printed.
I'm working on a sales worksheet. Some data on the worksheet, such as the
quot;dealer costquot;, need to be visible to the salesman and used in some
calculations, but if the salesman prints the worksheet, I don't want those
items to print.
Any thoughts?
Thanks.
Ken, have a look here for a way to do it,
www.rondebruin.nl/print.htm#Hide
--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 amp; 2003quot;Ken Mitchellquot; gt; wrote in message
...
gt; Hi, folks. I'm looking for a way to format a cell so that the cell(s)
gt; will
gt; _display_ on the worksheet, but not _print_ when the worksheet is printed.
gt;
gt; I'm working on a sales worksheet. Some data on the worksheet, such as the
gt; quot;dealer costquot;, need to be visible to the salesman and used in some
gt; calculations, but if the salesman prints the worksheet, I don't want those
gt; items to print.
gt;
gt; Any thoughts?
gt;
gt; Thanks.
Hmmm, I must not be doing it quite right.
I copied the appropriate sections of the code and ended up with
Private Sub Workbook_BeforePrint(Cancel As Boolean)
With ActiveSheet
.Rows(quot;31:31quot;).EntireRow.Hidden = True
.PrintOut
.Rows(quot;31:31quot;).EntireRow.Hidden = False
End With
End Sub
because I wanted to suppress printing for the cells in Row 31. Now it
prints the page twice; once with row 31 suppressed, and once with row 31
visible.
Any idea what I did wrong? Thanks.
quot;Paul Bquot; wrote:
gt; Ken, have a look here for a way to do it,
gt;
gt; www.rondebruin.nl/print.htm#Hide
gt; --
gt; Paul B
gt; Always backup your data before trying something new
gt; Please post any response to the newsgroups so others can benefit from it
gt; Feedback on answers is always appreciated!
gt; Using Excel 2002 amp; 2003
gt;
gt;
gt; quot;Ken Mitchellquot; gt; wrote in message
gt; ...
gt; gt; Hi, folks. I'm looking for a way to format a cell so that the cell(s)
gt; gt; will
gt; gt; _display_ on the worksheet, but not _print_ when the worksheet is printed.
gt; gt;
gt; gt; I'm working on a sales worksheet. Some data on the worksheet, such as the
gt; gt; quot;dealer costquot;, need to be visible to the salesman and used in some
gt; gt; calculations, but if the salesman prints the worksheet, I don't want those
gt; gt; items to print.
gt; gt;
gt; gt; Any thoughts?
gt; gt;
gt; gt; Thanks.
gt;
gt;
gt;
Read the code Ken
I use this to cancel the normal print
Cancel = True--
Regards Ron de Bruin
www.rondebruin.nlquot;Ken Mitchellquot; gt; wrote in message ...
gt; Hmmm, I must not be doing it quite right.
gt;
gt; I copied the appropriate sections of the code and ended up with
gt;
gt; Private Sub Workbook_BeforePrint(Cancel As Boolean)
gt; With ActiveSheet
gt; .Rows(quot;31:31quot;).EntireRow.Hidden = True
gt; .PrintOut
gt; .Rows(quot;31:31quot;).EntireRow.Hidden = False
gt; End With
gt; End Sub
gt;
gt; because I wanted to suppress printing for the cells in Row 31. Now it
gt; prints the page twice; once with row 31 suppressed, and once with row 31
gt; visible.
gt;
gt; Any idea what I did wrong? Thanks.
gt;
gt; quot;Paul Bquot; wrote:
gt;
gt;gt; Ken, have a look here for a way to do it,
gt;gt;
gt;gt; www.rondebruin.nl/print.htm#Hide
gt;gt; --
gt;gt; Paul B
gt;gt; Always backup your data before trying something new
gt;gt; Please post any response to the newsgroups so others can benefit from it
gt;gt; Feedback on answers is always appreciated!
gt;gt; Using Excel 2002 amp; 2003
gt;gt;
gt;gt;
gt;gt; quot;Ken Mitchellquot; gt; wrote in message
gt;gt; ...
gt;gt; gt; Hi, folks. I'm looking for a way to format a cell so that the cell(s)
gt;gt; gt; will
gt;gt; gt; _display_ on the worksheet, but not _print_ when the worksheet is printed.
gt;gt; gt;
gt;gt; gt; I'm working on a sales worksheet. Some data on the worksheet, such as the
gt;gt; gt; quot;dealer costquot;, need to be visible to the salesman and used in some
gt;gt; gt; calculations, but if the salesman prints the worksheet, I don't want those
gt;gt; gt; items to print.
gt;gt; gt;
gt;gt; gt; Any thoughts?
gt;gt; gt;
gt;gt; gt; Thanks.
gt;gt;
gt;gt;
gt;gt;
The Stupid Way:
Link conditional formatting to a cell value to change the font and
background color to what ever color you decide. Change the value of
the cell in code or manually before printing. After printing, change
the value back.Aha! Thanks. I appreciate the help.
quot;Ron de Bruinquot; wrote:
gt; Read the code Ken
gt;
gt; I use this to cancel the normal print
gt; Cancel = True
gt;
gt;
gt; --
gt; Regards Ron de Bruin
gt; www.rondebruin.nl
gt;
gt;
gt; quot;Ken Mitchellquot; gt; wrote in message ...
gt; gt; Hmmm, I must not be doing it quite right.
gt; gt;
gt; gt; I copied the appropriate sections of the code and ended up with
gt; gt;
gt; gt; Private Sub Workbook_BeforePrint(Cancel As Boolean)
gt; gt; With ActiveSheet
gt; gt; .Rows(quot;31:31quot;).EntireRow.Hidden = True
gt; gt; .PrintOut
gt; gt; .Rows(quot;31:31quot;).EntireRow.Hidden = False
gt; gt; End With
gt; gt; End Sub
gt; gt;
gt; gt; because I wanted to suppress printing for the cells in Row 31. Now it
gt; gt; prints the page twice; once with row 31 suppressed, and once with row 31
gt; gt; visible.
gt; gt;
gt; gt; Any idea what I did wrong? Thanks.
gt; gt;
gt; gt; quot;Paul Bquot; wrote:
gt; gt;
gt; gt;gt; Ken, have a look here for a way to do it,
gt; gt;gt;
gt; gt;gt; www.rondebruin.nl/print.htm#Hide
gt; gt;gt; --
gt; gt;gt; Paul B
gt; gt;gt; Always backup your data before trying something new
gt; gt;gt; Please post any response to the newsgroups so others can benefit from it
gt; gt;gt; Feedback on answers is always appreciated!
gt; gt;gt; Using Excel 2002 amp; 2003
gt; gt;gt;
gt; gt;gt;
gt; gt;gt; quot;Ken Mitchellquot; gt; wrote in message
gt; gt;gt; ...
gt; gt;gt; gt; Hi, folks. I'm looking for a way to format a cell so that the cell(s)
gt; gt;gt; gt; will
gt; gt;gt; gt; _display_ on the worksheet, but not _print_ when the worksheet is printed.
gt; gt;gt; gt;
gt; gt;gt; gt; I'm working on a sales worksheet. Some data on the worksheet, such as the
gt; gt;gt; gt; quot;dealer costquot;, need to be visible to the salesman and used in some
gt; gt;gt; gt; calculations, but if the salesman prints the worksheet, I don't want those
gt; gt;gt; gt; items to print.
gt; gt;gt; gt;
gt; gt;gt; gt; Any thoughts?
gt; gt;gt; gt;
gt; gt;gt; gt; Thanks.
gt; gt;gt;
gt; gt;gt;
gt; gt;gt;
gt;
gt;
gt;
- Nov 21 Wed 2007 20:40
Prevent Printing of Specific Cells
close
全站熱搜
留言列表
發表留言