Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,090
Default Page Break bug update query

Excel 2002, WinXP
My question is general in nature.
I'm helping an OP with a rather large project. At this point he is
getting an error that I am not. We have the same Excel build (version),
exactly, and exactly the same file. The problem is with a macro that deals
with PageBreaks. For your info, that macro is shown below.
The objective of this macro is to get the first PageBreak after
tsLastYear.Row (tsLastYear.Row is 109 in this case). We are working via
email and phone to nail something, anything, down. The problem comes and
goes. The error is a "subscript out of range" in the "IF" statement
argument. Like I said above, I am not having this problem. The presence of
hidden lines seems to be a factor. But not always. Also, he has somewhat
roasted his P3 CPU since his CPU fan quit some time ago and he gets error
messages from that.
I know that PageBreaks in VBA has a bug and I have some notes on that.
My question is: What is the latest information on that bug as regards
workarounds?
A point of interest is that the error occurs in the second cycle of the
"For" loop. This tells me that the code is OK. Thanks for your help. Otto

Sub LocateFirstPB()
Dim k As Long
With Sheets(SameShtRng(1).Value)
For k = 1 To 20
If .HPageBreaks(k).Location.Row tsLastYear.Row Then
FirstPBRow = .HPageBreaks(k).Location.Row
Exit For
End If
Next k
End With
End Sub


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Page Break bug update query

Hi Otto

See
http://www.rondebruin.nl/hpagebreaks.htm

Read the KB and see the workeround in the macro on my site

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


"Otto Moehrbach" wrote in message ...
Excel 2002, WinXP
My question is general in nature.
I'm helping an OP with a rather large project. At this point he is getting an error that I am not. We have the same Excel
build (version), exactly, and exactly the same file. The problem is with a macro that deals with PageBreaks. For your info, that
macro is shown below.
The objective of this macro is to get the first PageBreak after tsLastYear.Row (tsLastYear.Row is 109 in this case). We are
working via email and phone to nail something, anything, down. The problem comes and goes. The error is a "subscript out of
range" in the "IF" statement argument. Like I said above, I am not having this problem. The presence of hidden lines seems to be
a factor. But not always. Also, he has somewhat roasted his P3 CPU since his CPU fan quit some time ago and he gets error
messages from that.
I know that PageBreaks in VBA has a bug and I have some notes on that. My question is: What is the latest information on that
bug as regards workarounds?
A point of interest is that the error occurs in the second cycle of the "For" loop. This tells me that the code is OK. Thanks
for your help. Otto

Sub LocateFirstPB()
Dim k As Long
With Sheets(SameShtRng(1).Value)
For k = 1 To 20
If .HPageBreaks(k).Location.Row tsLastYear.Row Then
FirstPBRow = .HPageBreaks(k).Location.Row
Exit For
End If
Next k
End With
End Sub



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,090
Default Page Break bug update query

Thanks Ron. I'll look at that and incorporate it into my notes. Otto
"Ron de Bruin" wrote in message
...
Hi Otto

See
http://www.rondebruin.nl/hpagebreaks.htm

Read the KB and see the workeround in the macro on my site

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


"Otto Moehrbach" wrote in message
...
Excel 2002, WinXP
My question is general in nature.
I'm helping an OP with a rather large project. At this point he is
getting an error that I am not. We have the same Excel build (version),
exactly, and exactly the same file. The problem is with a macro that
deals with PageBreaks. For your info, that macro is shown below.
The objective of this macro is to get the first PageBreak after
tsLastYear.Row (tsLastYear.Row is 109 in this case). We are working via
email and phone to nail something, anything, down. The problem comes and
goes. The error is a "subscript out of range" in the "IF" statement
argument. Like I said above, I am not having this problem. The presence
of hidden lines seems to be a factor. But not always. Also, he has
somewhat roasted his P3 CPU since his CPU fan quit some time ago and he
gets error messages from that.
I know that PageBreaks in VBA has a bug and I have some notes on that.
My question is: What is the latest information on that bug as regards
workarounds?
A point of interest is that the error occurs in the second cycle of the
"For" loop. This tells me that the code is OK. Thanks for your help.
Otto

Sub LocateFirstPB()
Dim k As Long
With Sheets(SameShtRng(1).Value)
For k = 1 To 20
If .HPageBreaks(k).Location.Row tsLastYear.Row Then
FirstPBRow = .HPageBreaks(k).Location.Row
Exit For
End If
Next k
End With
End Sub





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,090
Default Page Break bug update query

I didn't see a KB. What KB were you referring to? Otto
"Ron de Bruin" wrote in message
...
Hi Otto

See
http://www.rondebruin.nl/hpagebreaks.htm

Read the KB and see the workeround in the macro on my site

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


"Otto Moehrbach" wrote in message
...
Excel 2002, WinXP
My question is general in nature.
I'm helping an OP with a rather large project. At this point he is
getting an error that I am not. We have the same Excel build (version),
exactly, and exactly the same file. The problem is with a macro that
deals with PageBreaks. For your info, that macro is shown below.
The objective of this macro is to get the first PageBreak after
tsLastYear.Row (tsLastYear.Row is 109 in this case). We are working via
email and phone to nail something, anything, down. The problem comes and
goes. The error is a "subscript out of range" in the "IF" statement
argument. Like I said above, I am not having this problem. The presence
of hidden lines seems to be a factor. But not always. Also, he has
somewhat roasted his P3 CPU since his CPU fan quit some time ago and he
gets error messages from that.
I know that PageBreaks in VBA has a bug and I have some notes on that.
My question is: What is the latest information on that bug as regards
workarounds?
A point of interest is that the error occurs in the second cycle of the
"For" loop. This tells me that the code is OK. Thanks for your help.
Otto

Sub LocateFirstPB()
Dim k As Long
With Sheets(SameShtRng(1).Value)
For k = 1 To 20
If .HPageBreaks(k).Location.Row tsLastYear.Row Then
FirstPBRow = .HPageBreaks(k).Location.Row
Exit For
End If
Next k
End With
End Sub





  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,090
Default Page Break bug update query

I found it. All I had to do was look. Otto
"Otto Moehrbach" wrote in message
...
I didn't see a KB. What KB were you referring to? Otto
"Ron de Bruin" wrote in message
...
Hi Otto

See
http://www.rondebruin.nl/hpagebreaks.htm

Read the KB and see the workeround in the macro on my site

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


"Otto Moehrbach" wrote in message
...
Excel 2002, WinXP
My question is general in nature.
I'm helping an OP with a rather large project. At this point he is
getting an error that I am not. We have the same Excel build (version),
exactly, and exactly the same file. The problem is with a macro that
deals with PageBreaks. For your info, that macro is shown below.
The objective of this macro is to get the first PageBreak after
tsLastYear.Row (tsLastYear.Row is 109 in this case). We are working via
email and phone to nail something, anything, down. The problem comes
and goes. The error is a "subscript out of range" in the "IF" statement
argument. Like I said above, I am not having this problem. The
presence of hidden lines seems to be a factor. But not always. Also,
he has somewhat roasted his P3 CPU since his CPU fan quit some time ago
and he gets error messages from that.
I know that PageBreaks in VBA has a bug and I have some notes on
that. My question is: What is the latest information on that bug as
regards workarounds?
A point of interest is that the error occurs in the second cycle of the
"For" loop. This tells me that the code is OK. Thanks for your help.
Otto

Sub LocateFirstPB()
Dim k As Long
With Sheets(SameShtRng(1).Value)
For k = 1 To 20
If .HPageBreaks(k).Location.Row tsLastYear.Row Then
FirstPBRow = .HPageBreaks(k).Location.Row
Exit For
End If
Next k
End With
End Sub







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
Excel 2007 Page Break Adjustments causes a page break each cell BKaufman Excel Worksheet Functions 2 September 10th 10 05:02 AM
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
change and/or remove page number watermark in page break preview juga Excel Discussion (Misc queries) 2 December 25th 06 10:15 AM
PRINT PAGE BREAK VIEW AS WATERMARK FIOR EACH PAGE RALPH Setting up and Configuration of Excel 3 March 16th 06 11:08 PM
adding a new page break to an existing page break Edward Letendre Excel Discussion (Misc queries) 1 March 6th 05 09:29 AM


All times are GMT +1. The time now is 04:46 PM.

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

About Us

"It's about Microsoft Excel"