Trying to delete existing unwanted horizontal page breaks

J

John Strickland

When formatting a report with varying row heights and row pairs, the existing
(system-created page breaks are often in the wrong location. I have tried
several other methods such as listed on this group to delete all or to delete
individual page breaks, to no avail, such as:

ActiveSheet.ResetAllPageBreaks '/ TURNS ON BAD VERT PAGE BREAKS !!!!
ActiveSheet.DisplayPageBreaks = False '/ system breaks ????
ActiveSheet.DisplayAutomaticPageBreaks = False '/ system breaks ????

Which either do nothing or turn on undesirable vertical breaks messing up a
landscape-formatted spreadsheet. I seem to have no trouble inserting
additional page breaks with:

ActiveSheet.HPageBreaks.Add Before:=ActiveSheet.Cells(Irr_rows, 1)
and send the location where I have set them to the immediate window.

and can count the total number and detect where they occur with

tbreaks = ActiveSheet.HPageBreaks.Count '/ get current page break total
this sheet

and then have to go back and manually delete the unwanted breaks.

Is there ANY WAY to delete individual or all existing horizontal page breaks,
and is there any software difference between a system-inserted or a
manually-inserted page break?

John Strickland
 
J

Jim Cone

There is no way to remove automatic pagebreaks; only manual page
breaks can be removed. You can force the relocation of automatic
page breaks by inserting or removing manual pagebreaks.

Try going into page break preview and inserting/removing/dragging pagebreaks
to see how the automatic pagebreaks react.
Note that changing the fit to pages wide/tall settings will also cause pagebreaks
to relocate.
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins -try the free trial of "Rows to Repeat at Bottom")




"John Strickland"
wrote in message
When formatting a report with varying row heights and row pairs, the existing
(system-created page breaks are often in the wrong location. I have tried
several other methods such as listed on this group to delete all or to delete
individual page breaks, to no avail, such as:

ActiveSheet.ResetAllPageBreaks '/ TURNS ON BAD VERT PAGE BREAKS !!!!
ActiveSheet.DisplayPageBreaks = False '/ system breaks ????
ActiveSheet.DisplayAutomaticPageBreaks = False '/ system breaks ????

Which either do nothing or turn on undesirable vertical breaks messing up a
landscape-formatted spreadsheet. I seem to have no trouble inserting
additional page breaks with:

ActiveSheet.HPageBreaks.Add Before:=ActiveSheet.Cells(Irr_rows, 1)
and send the location where I have set them to the immediate window.

and can count the total number and detect where they occur with

tbreaks = ActiveSheet.HPageBreaks.Count '/ get current page break total
this sheet

and then have to go back and manually delete the unwanted breaks.

Is there ANY WAY to delete individual or all existing horizontal page breaks,
and is there any software difference between a system-inserted or a
manually-inserted page break?

John Strickland
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top