Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Printing if a cell is blank

I have some code that selects sheets by sheet name. But I
also want to select some other sheets if they are not
blank. The user will click on a button to do this and then
I want to print all those sheets selected. I can do all
of this apart from selecting the sheets that are not blank
Can anyone help?

Thanks,

Martin
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 691
Default Printing if a cell is blank

Hi Martin,
There is a conflict between the subject and text in the body.
But since you say you know how the handle the rest, the part
you are looking for is probably one of the following:

If you want the equivalent of a single cell checked to see if
it is blank (or not blank) use ISEMPTY(...) in VBA for the
equivalent of ISBLANK(...) Worksheet Function.

If you want to see if there is any constant data anywhere on the sheet
IF Cells.SpecialCells(xlConstants).Count < 0 then ...

For those that want to know how to cycle through a selection
of worksheets see http://www.mvps.org/dmcritchie/excel/insrtrow.htm
look for modification by Gary Brown
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"Martin" wrote...
I have some code that selects sheets by sheet name. But I
also want to select some other sheets if they are not
blank. The user will click on a button to do this and then
I want to print all those sheets selected. I can do all
of this apart from selecting the sheets that are not blank



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
Cell blank when printing ckrogers Excel Discussion (Misc queries) 1 May 2nd 09 05:49 AM
Printing a blank spreadsheet AlliKat Excel Discussion (Misc queries) 4 February 3rd 09 08:49 PM
Printing a blank spreadsheet. ctrbeth Excel Discussion (Misc queries) 7 November 27th 07 02:32 PM
deny printing for certain blank cells huntnpeck2 Excel Worksheet Functions 2 October 3rd 07 04:57 PM
printing blank cells cmh Excel Discussion (Misc queries) 2 November 15th 06 08:11 PM


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