Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I think that I will be able to use this, yes. Thank you
very much for the help! -----Original Message----- Here is a macro, I think by Ron de Bruin, that will put page of page in the active cell, will that help? Sub pagenumber() 'will not update automatically 'will put page of page in the active cell Dim VPC As Integer, HPC As Integer Dim VPB As VPageBreak, HPB As HPageBreak Dim NumPage As Integer If ActiveSheet.PageSetup.Order = xlDownThenOver Then HPC = ActiveSheet.HPageBreaks.Count + 1 VPC = 1 Else VPC = ActiveSheet.VPageBreaks.Count + 1 HPC = 1 End If NumPage = 1 For Each VPB In ActiveSheet.VPageBreaks If VPB.Location.Column ActiveCell.Column Then Exit For NumPage = NumPage + HPC Next VPB For Each HPB In ActiveSheet.HPageBreaks If HPB.Location.Row ActiveCell.Row Then Exit For NumPage = NumPage + VPC Next HPB ActiveCell = "Page " & NumPage & " of " & _ Application.ExecuteExcel4Macro("GET.DOCUMENT(50)" ) End Sub -- Paul B Always backup your data before trying something new Please post any response to the newsgroups so others can benefit from it Feedback on answers is always appreciated! Using Excel 2000 & 2003 ** remove news from my email address to reply by email ** "Wandering Mage" wrote in message ... I there any way (work around or direct function) to get the page number that a given cell will print on? Help is appreciated! . |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Referencing an active cell's content from another sheet. | Excel Worksheet Functions | |||
Active cell counting in particular print page (one sheet having different print area) | Excel Worksheet Functions | |||
Why do I get a print error light trying to print an excel sheet ? | Excel Discussion (Misc queries) | |||
How do I print a cell's contents as a footer? | Setting up and Configuration of Excel | |||
get cell's print sheet number | Excel Programming |