Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ed Ed is offline
external usenet poster
 
Posts: 399
Default Check for empty cells in Print Area?

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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Check for empty cells in Print Area?

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




  #3   Report Post  
Posted to microsoft.public.excel.programming
Ed Ed is offline
external usenet poster
 
Posts: 399
Default Check for empty cells in Print Area?

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






  #4   Report Post  
Posted to microsoft.public.excel.programming
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








  #5   Report Post  
Posted to microsoft.public.excel.programming
Ed Ed is offline
external usenet poster
 
Posts: 399
Default Check for empty cells in Print Area?

David - I looked on your BuildTOC page, but couldn't find where you
reference and use the PrintArea range. In fact, even though Excel help says
it returns a range, I can't set a reference to it to use it. But I do
notice that when setting up the PrintOut expression, there is a Pages
option, which referes to the actual page that would be printed. But I
wasn't able to get a reference to it, either.

If you have any further info, I would be grateful for the help.

Ed

"David McRitchie" wrote in message
...
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












  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 691
Default Check for empty cells in Print Area?

Hi Ed,
find on printarea had no problem finding table, 2nd table below
http://www.mvps.org/dmcritchie/excel...toc.htm#sheets
or the following line of code:
Cells(cRow - 1 + cSht, cCol + 7) = Sheets(cSht).PageSetup.PrintArea

But the main point that I want to make is that the use of a
Print Area should normally only be used as a last resort,
you should be fixing your lastcell indication, so that you aren't
printing extra pages.

BTW, Print Preview prints everything, there is no selection, at
least not in Excel 2000, so the range would be the usedrange
that you can find with Ctrl+End
MsgBox ActiveSheet.UsedRange.Address(0, 0)

---
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 ...
David - I looked on your BuildTOC page, but couldn't find where you
reference and use the PrintArea range. In fact, even though Excel help says
it returns a range, I can't set a reference to it to use it. But I do
notice that when setting up the PrintOut expression, there is a Pages
option, which referes to the actual page that would be printed. But I
wasn't able to get a reference to it, either.

If you have any further info, I would be grateful for the help.

Ed

"David McRitchie" wrote in message
...
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



"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












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
Set print area over locked cells toolman Excel Worksheet Functions 0 October 17th 08 05:04 PM
When printing - ability to not print empty or $0 cells Briant Excel Discussion (Misc queries) 1 November 29th 07 09:21 PM
setting print area to selected cells [email protected] Excel Discussion (Misc queries) 4 November 30th 06 09:29 PM
eliminating empty cells from chart area financeman500 Charts and Charting in Excel 1 February 22nd 06 04:41 PM
Highlighting a Block of Cells to Define the Print Area Mark[_22_] Excel Programming 8 November 18th 03 03:43 AM


All times are GMT +1. The time now is 08:36 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"