LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default problem with finding horizontal page breaks

Hi

I'm trying to use the following code to get all the horizontal page
breaks

Dim varArray() As Variant
Dim x As Variant
Dim i As Integer

For Each x In objWkBk.Worksheets("sheet1").HPageBreaks
i = i + 1
ReDim Preserve varArray(i)
varArray(i) = x.Location.Row
Next x

objWkBk is in separate instance of excel.
The problem is if there is more than 1 page break the code errors with
a subscript out of range. Any ideas?
 
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
1026 horizontal page breaks? GregL Excel Discussion (Misc queries) 0 April 30th 08 07:03 PM
Trying to delete existing unwanted horizontal page breaks John Strickland Excel Programming 1 January 30th 08 12:04 AM
Horizontal Page Breaks Jon Peltier Excel Programming 0 December 5th 06 06:54 PM
horizontal page breaks Santhosh Kumar Excel Discussion (Misc queries) 1 June 25th 05 02:04 PM
Count the number of just the horizontal manual page breaks DataFreakFromUtah Excel Programming 1 November 27th 03 03:59 PM


All times are GMT +1. The time now is 04:10 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"