View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
david mcritchie david mcritchie is offline
external usenet poster
 
Posts: 691
Default Check for empty cells in Print Area?

Hi Ed,
If I understand you correctly it would be a lot better / easier
to eliminate the concept of having a Print Area
and instead remove the unused rows and columns from the
used range.
http://www.mvps.org/dmcritchie/excel...m#makelastcell

To let Excel find where your lastcell should be you can use
Debra's macro at
Why do my scrollbars go to row 500 -- my data ends in cell E50?,--
http://www.contextures.com/xlfaqApp.html#Unused

You can determine what the printarea is using a macro, I do that
on my buildtoc.htm page.
http://www.mvps.org/dmcritchie/excel/buildtoc.htm

---
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

"Ed" wrote in message ...
I'm wanting to print using a macro. Usually, all I adjust in the print area
is the margins. I then do a Print Preview and see what I've got. Many
times, the creator has modified a previous workbook, or copied a previous
worksheet as a "Template", and there may be a piece of border or an unused
formula that creates a blank page in the Print Preview.

I'm wondering if there's a way to "capture" the range shown in a Print
Preview and check it for cells with no visible value. In essence, do by
macro what I would visually and manually - if I can't see anything, don't
print that page.

Ed

"Tom Ogilvy" wrote in message
...
Did you manually set the print area, or do you mean if you don't set the
print area and just print the page.

In any event, do you mean check it with a macro or what?

--
Regards,
Tom Ogilvy

"Ed" wrote in message
...
Is there a way to check the Print Area for empty cells (or at least no
visible value) so I don't print blank sheets?

Ed