Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Reading H Page Breaks

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Reading H Page Breaks

Hi kohai

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

read about the bug in the macro

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


"kohai" wrote in message ...
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Reading H Page Breaks


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


--
Leith Ross
------------------------------------------------------------------------
Leith Ross's Profile: http://www.excelforum.com/member.php...o&userid=18465
View this thread: http://www.excelforum.com/showthread...hreadid=505138

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Reading H Page Breaks

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

"Leith Ross" wrote:


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


--
Leith Ross
------------------------------------------------------------------------
Leith Ross's Profile: http://www.excelforum.com/member.php...o&userid=18465
View this thread: http://www.excelforum.com/showthread...hreadid=505138


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
I can't move my page breaks in Page Break Preview btaft Excel Discussion (Misc queries) 6 April 27th 23 11:49 AM
When automatic page breaks are moved each cell becomes a new page Queso hotmail com> Excel Discussion (Misc queries) 0 March 30th 10 03:08 AM
Vertical page breaks won't drag in Page Break Preview Caroline Excel Discussion (Misc queries) 0 July 14th 09 12:19 PM
How do I do page breaks when view menu doesnt page break preview HeatherF55 Excel Discussion (Misc queries) 0 September 21st 07 04:24 AM
Page Breaks- Printing selected rows on same page ToddEZ Excel Discussion (Misc queries) 1 July 18th 07 04:38 PM


All times are GMT +1. The time now is 09:29 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"