Question : Determine PrintArea in Excel

I am trying to determine the cell addresses of print areas on a worksheet.  When the print areas are non-contiguous/adjacent, this is straightforward since the "PageSetup.PrintArea" property of the worksheet returns a comma-separated list of cell addresses.  The problem is that for contiguous print areas, the "PageSetup.PrintArea" property of the worksheet returns a single cell address, even if the print area consists of more than one page.

So, how can I determine the cell addresses of all individual print areas, regardless of whether or not they are contiguous?

NOTE:  You can check the print area address in the Name Manager dialog (Alt > i > n > d) under the name "Print_Area".

Answer : Determine PrintArea in Excel

OK, check out this file... it perfectly addresses what you need and the code is only 76 lines long compared to your 139. Not to forget, I have written extra lines of code to paint the identified pages instead of simply using MsgBox.

Let me know what you think.
 
Updated perfect file... press CTRL+SHIFT+P
 
Random Solutions  
 
programming4us programming4us