View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Mik Mik is offline
external usenet poster
 
Posts: 1
Default Array of page ranges

Okay, I will pick these suggestions apart and am confident
I can come up with a solution. Thanks much to all who
responded.

-----Original Message-----
Hello.

I need a function or subroutine that will return an array
of the page ranges on the currently active sheet.

The number of pages is variable, but they always involve
horizontal page breaks only (i.e. no vertical breaks).

They may include both natural breaks (Excel imposed) as
well as manual page breaks (so I can't just count the
number of rows) to the next break.

The print area is always set.

So, as an example, if the set print area is "A3:J111" my
array should contain a list that looks like the following:

1st Element = "A3:J53"
2nd Element = "A54:J105"
3rd Element = "A106:J111"

My attempted code was so bad, I trashed it.

Your example code is what I need. Please help if you can.
Thanks much in advance.
.