Hi!
I'm trying to use this code to a range of cells selected. Any input will be appreciated
Sub InsertPageBreaks() 'Updateby20140618 Dim xLastrow As Long Dim xWs As Worksheet Set xWs = Application.ActiveSheet xRow = Application.InputBox("Row", xTitleId, "", Type:=1) xLastrow = xWs.Range("A15").SpecialCells(xlCellTypeLastCell).Row For i = xRow + 1 To xLastrow Step xRow xWs.HPageBreaks.Add Before:=xWs.Cells(i, 1) Next i End Sub