Referencing the very top of a page??

mmartin

New Member
Joined
Apr 10, 2002
Messages
10
Hi,
does anyone know how I could advance through a sheet(which is full of page breaks) one page at a time and reference the very first cell of each page?
Cheers,
Mark
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
Hi. Pls try this.<pre>
Sub test()
Dim objBreak As HPageBreak, rngLine As Range
ActiveWindow.View = xlPageBreakPreview
For Each objBreak In ActiveSheet.HPageBreaks
Set rngLine = objBreak.Location
Debug.Print rngLine.Address
Next
ActiveWindow.View = xlNormalView
Set objBreak = Nothing: Set rngLine = Nothing
End Sub</pre>
This message was edited by Colo on 2002-04-23 02:38
 
Upvote 0
Thanks Colo,
but that debug rpints the page number not the first cell reference. I'm trying to copy the first cell of each page into each page header. Any ideas?
Cheers,
Mark
 
Upvote 0
Hi Mark. I would email with a sample file to you.

Regards,
Colo
 
Upvote 0

Forum statistics

Threads
1,213,492
Messages
6,113,967
Members
448,537
Latest member
Et_Cetera

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top