Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Here is a simple code I've written that returns page break locations, but only those page breaks that I've inserted manually. It won't return page breaks that Excel inserts automatically. If I try to get these page breaks I get the message, "subscript out of range. Can anybody tell me why? And how to use this type of simple code to get automatic page breaks? Sub pageBreakA1C1() 'will find only those page breaks that were manually inserted 'won't find those inserted automaticall by Excel Dim myPageBreakA1C1 myPageBreakA1C1 = ActiveWorkbook.Worksheets(1).HPageBreaks(2).Locati on.Address(, , xlR1C1) Range("A3").Select Selection = myPageBreakA1C1 Range("A4").Select Range("A3").ClearContents End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Deleting PageBreaks | Excel Programming | |||
Deleting PageBreaks | Excel Programming | |||
Pagebreaks are not made | Excel Programming | |||
pagebreaks | Excel Programming | |||
Excel pagebreaks | Excel Programming |