Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / January 2006

Tip: Looking for answers? Try searching our database.

Reading H Page Breaks

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
kohai - 25 Jan 2006 22:11 GMT
Hi,

It seems pretty easy to add a page break, but I'm trying to find the rows
where a horizontal page break exists.  I've been trying use something ilke
the following to loop through them and see their location

For x = 1 To Worksheets(1).HPageBreaks.Count
   debug.print  Worksheets(1).HPageBreaks(x).Location
Next

but that doesn't return anything.

I have a changing report where I need to insert a line after a page break to
add a header row (the fluid part).

Any assistance is greatly appreciated!

Thanks,

kohai
Ron de Bruin - 25 Jan 2006 22:18 GMT
Hi kohai

Look at this macro
http://www.rondebruin.nl/hpagebreaks.htm

read about the bug in the macro

Signature

Regards Ron de Bruin
http://www.rondebruin.nl

> Hi,
>
[quoted text clipped - 16 lines]
>
> kohai
Leith Ross - 25 Jan 2006 22:26 GMT
Hello Kohai,

The Location property is a Range object. You need to only add the
Address property to return the cell's location. See Below...

For x = 1 To Worksheets(1).HPageBreaks.Count
debug.print Worksheets(1).HPageBreaks(x).Location.Address
Next

Sincerely,
Leith Ross

Signature

Leith Ross

kohai - 27 Jan 2006 15:13 GMT
Thank you both for your replies. They will help me proceed to the next stage
of formatting my report to how I'd like it to look.

Regards,
kohai

> Hello Kohai,
>
[quoted text clipped - 7 lines]
> Sincerely,
> Leith Ross
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.