Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 13
Default Restricting Cell from being Printed

I have created a simple table based form in Excel.
I want some cells to be printed fully black if nothing is entered in it.

Is there any way, I can do this?

Thanks in Advance!

Regards,
Denis
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Restricting Cell from being Printed

Before printing:

Format Cells... Patterns Color
and pick the same as the font color

After Printing, reverse this.

You can do it manually, or with a macro.
--
Gary''s Student - gsnu200788


"Denis" wrote:

I have created a simple table based form in Excel.
I want some cells to be printed fully black if nothing is entered in it.

Is there any way, I can do this?

Thanks in Advance!

Regards,
Denis

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 13
Default Restricting Cell from being Printed

Thanks Gary and Gord for your valued reply.

But, what I want is like this:
I have created a sheet, which I will give to the users to enter their name.
I dont want users to take its print without entering their name and then
manually hand-write their name.

They should enter their name and then only take its print. So, I want that
if the user does not enter anything in his name field (cell), then that
particular cell should be printed black.

I hope you exactly understand my query.

Thanks in Advance!

Regards,
Denis





"Gary''s Student" wrote:

Before printing:

Format Cells... Patterns Color
and pick the same as the font color

After Printing, reverse this.

You can do it manually, or with a macro.
--
Gary''s Student - gsnu200788


"Denis" wrote:

I have created a simple table based form in Excel.
I want some cells to be printed fully black if nothing is entered in it.

Is there any way, I can do this?

Thanks in Advance!

Regards,
Denis

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Restricting Cell from being Printed

Private Sub Workbook_BeforePrint(Cancel As Boolean)
With ActiveSheet.Range("A1")
If .Value = "" Then
.Interior.ColorIndex = 1
Else
.Interior.ColorIndex = xlNone
End If
End With
End Sub

Right-click on the Excel Icon left of "File" and select "View Code"

Copy/paste the above into that module.

Edit the Range("A1") to suit.

Alt + q to return to the Excel window.


Gord

On Tue, 27 May 2008 00:04:00 -0700, Denis
wrote:

Thanks Gary and Gord for your valued reply.

But, what I want is like this:
I have created a sheet, which I will give to the users to enter their name.
I dont want users to take its print without entering their name and then
manually hand-write their name.

They should enter their name and then only take its print. So, I want that
if the user does not enter anything in his name field (cell), then that
particular cell should be printed black.

I hope you exactly understand my query.

Thanks in Advance!

Regards,
Denis





"Gary''s Student" wrote:

Before printing:

Format Cells... Patterns Color
and pick the same as the font color

After Printing, reverse this.

You can do it manually, or with a macro.
--
Gary''s Student - gsnu200788


"Denis" wrote:

I have created a simple table based form in Excel.
I want some cells to be printed fully black if nothing is entered in it.

Is there any way, I can do this?

Thanks in Advance!

Regards,
Denis


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Restricting Cell from being Printed

Thanks Gord for your Valued Reply.

But, this code is not working. I just changed the cell range from "A1"
to "C8". And kept the cell "C8" blank. But, it didnot filled it with
black colour. It printed it blank (colourless).

Thanks in Advance.

Regards,
Denis




Gord Dibben wrote:
Private Sub Workbook_BeforePrint(Cancel As Boolean)
With ActiveSheet.Range("A1")
If .Value = "" Then
.Interior.ColorIndex = 1
Else
.Interior.ColorIndex = xlNone
End If
End With
End Sub

Right-click on the Excel Icon left of "File" and select "View Code"

Copy/paste the above into that module.

Edit the Range("A1") to suit.

Alt + q to return to the Excel window.


Gord

On Tue, 27 May 2008 00:04:00 -0700, Denis
wrote:

Thanks Gary and Gord for your valued reply.

But, what I want is like this:
I have created a sheet, which I will give to the users to enter their name.
I dont want users to take its print without entering their name and then
manually hand-write their name.

They should enter their name and then only take its print. So, I want that
if the user does not enter anything in his name field (cell), then that
particular cell should be printed black.

I hope you exactly understand my query.

Thanks in Advance!

Regards,
Denis





"Gary''s Student" wrote:

Before printing:

Format Cells... Patterns Color
and pick the same as the font color

After Printing, reverse this.

You can do it manually, or with a macro.
--
Gary''s Student - gsnu200788


"Denis" wrote:

I have created a simple table based form in Excel.
I want some cells to be printed fully black if nothing is entered in it.

Is there any way, I can do this?

Thanks in Advance!

Regards,
Denis




  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Restricting Cell from being Printed

Are you sure C8 is blank?

No extra <space" or?

Did you place the code into Thisworkbook module?

Tested with C8 and works fine at this end.......Excel 2003


Gord

On Wed, 28 May 2008 10:44:47 +0530, Denis wrote:

Thanks Gord for your Valued Reply.

But, this code is not working. I just changed the cell range from "A1"
to "C8". And kept the cell "C8" blank. But, it didnot filled it with
black colour. It printed it blank (colourless).

Thanks in Advance.

Regards,
Denis




Gord Dibben wrote:
Private Sub Workbook_BeforePrint(Cancel As Boolean)
With ActiveSheet.Range("A1")
If .Value = "" Then
.Interior.ColorIndex = 1
Else
.Interior.ColorIndex = xlNone
End If
End With
End Sub

Right-click on the Excel Icon left of "File" and select "View Code"

Copy/paste the above into that module.

Edit the Range("A1") to suit.

Alt + q to return to the Excel window.


Gord

On Tue, 27 May 2008 00:04:00 -0700, Denis
wrote:

Thanks Gary and Gord for your valued reply.

But, what I want is like this:
I have created a sheet, which I will give to the users to enter their name.
I dont want users to take its print without entering their name and then
manually hand-write their name.

They should enter their name and then only take its print. So, I want that
if the user does not enter anything in his name field (cell), then that
particular cell should be printed black.

I hope you exactly understand my query.

Thanks in Advance!

Regards,
Denis





"Gary''s Student" wrote:

Before printing:

Format Cells... Patterns Color
and pick the same as the font color

After Printing, reverse this.

You can do it manually, or with a macro.
--
Gary''s Student - gsnu200788


"Denis" wrote:

I have created a simple table based form in Excel.
I want some cells to be printed fully black if nothing is entered in it.

Is there any way, I can do this?

Thanks in Advance!

Regards,
Denis



  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Restricting Cell from being Printed

Try FormatConditional Formatting to set the blank cells to black, although
would be black even when not printing.

Or run a macro to color the cells black before printing then undo after
printing.

Sub printblack()
For Each cell In Selection
If cell.Value = "" Then
cell.Interior.ColorIndex = 1
End If
Next cell
End Sub

Sub undoprintblack()
For Each cell In Selection
If cell.Value = "" Then
cell.Interior.ColorIndex = xlnone
End If
Next cell
End Sub


Gord Dibben MS Excel MVP

On Fri, 23 May 2008 23:15:00 -0700, Denis
wrote:

I have created a simple table based form in Excel.
I want some cells to be printed fully black if nothing is entered in it.

Is there any way, I can do this?

Thanks in Advance!

Regards,
Denis


Reply
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
Cell width is different in the printed version Dan Excel Discussion (Misc queries) 4 October 19th 07 05:38 PM
Increment a number in a cell for each page printed Steve Vincent Excel Discussion (Misc queries) 6 June 19th 06 11:12 PM
borders not aligned with cell content when printed andy g Excel Discussion (Misc queries) 2 June 5th 06 04:33 PM
Restricting Cell Format zhj23 Excel Discussion (Misc queries) 3 August 27th 05 02:53 PM


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