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: 146
Default A problem with HPageBreaks

Hello is there an issue with playing with HPageBreaks, I have the following
code

Sub newPageIfRangeOver(rng as Range)

Dim pageBreaks As HPageBreaks
Dim pageBreak As HPageBreak
Set pageBreaks = Sheets(rng.Worksheet.name).HPageBreaks

For Each pageBreak In pageBreaks
...
Next pageBreak
End Sub

This Sub is called a number of times depending on data recieved, it has
started to just say "Subscript out of range" yet if I step through the the
program slowley, it works, no error. I'm just wondering if there is an error
with the HPageBreak Object that I perhaps I have overlooked.

Thanks in advance for any help thrown my way.
 
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
Strange problem with HPageBreaks Ron de Bruin Excel Programming 0 June 29th 08 11:13 AM
HPageBreaks.Add Stephen Plotnick Excel Programming 2 July 7th 07 01:41 AM
HPageBreaks.Add GeorGeorGe Excel Worksheet Functions 0 February 9th 05 09:31 PM
More HpageBreaks Strangeness BillzyBop Excel Programming 0 June 23rd 04 03:40 AM
HPageBreaks oddities... Alex T Excel Programming 3 June 8th 04 02:01 PM


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