Re: page break after

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Hi William,

I'm put in what you gave me ... its possible i didnt put it in the right
place ( VB)... but it didnt work.. im sorry im not a programmer.....


"William" wrote:

> Hi
>
> Sub test()
> Dim c As Range, r As Range
> With Active***
> ..ResetAllPageBreaks
> Set r = .Range(.Range("A2"), .Range("A" & Rows.Count).End(xlUp))
> For Each c In r
> If c <> c.Offset(-1, 0) Then .HPageBreaks.Add Before:=c
> Next c
> End With
> End Sub
>
> --
>
> XL2003
> Regards
>
> William
> willwest22@xxxxxxxxx
>
>
> "eager beaver" <eager beaver@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> news:03D63347-F564-4612-8F28-945B460985F4@xxxxxxxxxxxxxxxx
> > lets say i have sally typed in rows 1-5, bob in rows 6-10, and john in
> > rows
> > 11-15. how can i work it so excel automatically inserts a page break after
> > each name in the cell changes. in other words a page break between sally
> > and
> > bob, bob and john.
> >
> > this spread*** is massive!
> >
> > please help!
>
>
>
.


Quantcast