Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel 2007 Page Break Adjustments causes a page break each cell | Excel Worksheet Functions | |||
How do I do page breaks when view menu doesnt page break preview | Excel Discussion (Misc queries) | |||
change and/or remove page number watermark in page break preview | Excel Discussion (Misc queries) | |||
PRINT PAGE BREAK VIEW AS WATERMARK FIOR EACH PAGE | Setting up and Configuration of Excel | |||
adding a new page break to an existing page break | Excel Discussion (Misc queries) |