View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
NickHK NickHK is offline
external usenet poster
 
Posts: 4,391
Default returning the activecell's page number

As well as the horizontal and vertical page breaks, it would also depend on
if you are printing across-then-down, or down-then-across.
And also .FirstPageNumber

NickHK

"Bookreader" wrote in message
...
On Thu, 6 Jul 2006 12:16:02 -0700, gill
wrote:

I want to know about the page itself in that specific sheet, not the

number
of sheets

"Brad E." wrote:

X = 0
For Y = 1 to Worksheets.Count
If Worksheets(Y).Name = ActiveSheet.Name then X = Y
Next Y

"gill" wrote:

How would I get the selected cell's page number, for example if ive

selected
cell C345, i may be on page 5 depending on the print area. I would

like it
that VB would return me 5 and i could assign this to a variable


So, you would like to count the pagebreaks and add one to the count?