View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Rob[_5_] Rob[_5_] is offline
external usenet poster
 
Posts: 25
Default Finding out which page a cell is in

David,
thanks, and now I know why my search did not find anything: I wrote
"Pagenumber" as one word, not as two separate words. And yes, I did a web
search in Google. And stupid, stupid: never looked at newgroups search...
:-((((

Thanks, a slightly ashamed Rob....





"David McRitchie" schreef in bericht
...
Hi Rob,

Excel Developer Tip: Determining the Number of Printed Pages
http://www.j-walk.com/ss/excel/tips/tip65.htm

Page number of the active cell, Find the page number of the activecell

(Sub not formula). Laurent Longre 2000-04-21 programming.
http://groups.google.com/groups?oi=d...m=an_613974661

Some postings by Myrna Larson, that determine the page number for the

activecell and think there is one somewhere that does it for a
column of cells. (but could not find it) AN=626272822 2000/05/23,

AN=561640908 1999/12/16 .
http://groups.google.com/groups?oi=d...m=an_626272822
http://groups.google.com/groups?oi=d...m=an_561640908

Did you mean you did a Google web search or a Google Groups (newsgroups)

search,
you will probably find more results by searching newsgroups..
http://www.mvps.org/dmcritchie/excel/xlnews.htm

http://groups.google.com/advanced_gr...Excel*&num=100
search for all words: "page number" activecell

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

"Rob" wrote in message

. ..
Hello FellowNewsgroupReaders,

I want to find out on which page a certain cell will be BEFORE it is
printed. I checked google, but there's only a link to an add-in. Sure it
must be possible to find out myself.

I worked by finding the adresses of all pagebreaks in the sheets, but

even
that provides me with a problem. After inserting a manual pagebreak

under
cell A2 I created this code:

Sub Page()

Dim rng
Dim pb
Set rng = Range("A1:A6")
For Each pb In rng
If pb.PageBreak = xlPageBreakManual Then
MsgBox pb.Address
End If
Next

End Sub

But it does not work like that. So what can I do to get all adresses of
pagebreaks (horizontal!) in my sheet, and preferrably how to find out

what
page a cell is in....

Regards,
Rob