Insert HPageBreaks

  • Thread starter Thread starter Robert Christie
  • Start date Start date
R

Robert Christie

Hi Everyone
Is it at all possible to insert pagebreaks in multiple
places at the same time?
The code below does not work.
Range("A38,74").Select
ActiveWindow.SelectedSheets.HPageBreaks.Add _
Before:=ActiveCell

TIA

Bob XL2002
 
No, but you can do this:

Dim cell As Range
For Each cell In Range("A38,A74")
ActiveWindow.SelectedSheets.HPageBreaks.Add cell
Next cell
 
Hi J.e.
Thankyou for your quick reply.
I must try and get this old head of mine around the Dim'
For's and next's of this VBA.
Thanks again

Bob C.
 
Back
Top