HPageBreaks - Can add 'em, but can't get rid of 'em...

  • Thread starter Thread starter Shane R. Pouch
  • Start date Start date
S

Shane R. Pouch

I have written a macro, which includes the following (and is working just
fine):

Range("B5").Select
ActiveSheet.HPageBreaks.Add Before:=ActiveCell

But, I cannot figure out how to get rid of the page break when I want to.

I have tried:

Range("B5").Select
ActiveSheet.HPageBreaks.Delete Before:=ActiveCell

And:

Range("B5").Select
ActiveSheet.HPageBreaks.Remove Before:=ActiveCell

But neither worked.

Help!!
 
ActiveCell.PageBreak = xlNone

--
Jim
|I have written a macro, which includes the following (and is working just
| fine):
|
| Range("B5").Select
| ActiveSheet.HPageBreaks.Add Before:=ActiveCell
|
| But, I cannot figure out how to get rid of the page break when I want to.
|
| I have tried:
|
| Range("B5").Select
| ActiveSheet.HPageBreaks.Delete Before:=ActiveCell
|
| And:
|
| Range("B5").Select
| ActiveSheet.HPageBreaks.Remove Before:=ActiveCell
|
| But neither worked.
|
| Help!!
|
|
 
Using this syntax, what would you write to add the page break in the first
place, as this is a little different than the HPageBreaks syntax?
 
ActiveCell.PageBreak = xlManual

--
Jim
Shane R. Pouch said:
Using this syntax, what would you write to add the page break in the first
place, as this is a little different than the HPageBreaks syntax?
 
Back
Top