View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
John Strickland John Strickland is offline
external usenet poster
 
Posts: 1
Default Trying to delete existing unwanted horizontal page breaks

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 Befo=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