View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
david mcritchie david mcritchie is offline
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