Insert page breaks every 50 rows but do not include hidden rows
Hi There
I'm not sure exactly what it is you want to do with the sheet but it
would sound like you want to print it??? if so you could try
something like the following to process it for you what it does is
creates a new sheet then copies all the visible rows to it and set
your page breaks from there.
Private Sub CommandButton1_Click()
With Sheets.Add
.Name = "Filtered Sheet"
Sheets("sheet1").
[a1:a200].SpecialCells(xlCellTypeVisible).EntireRow.Copy
Sheets("Filtered Sheet").Range("A1").PasteSpecial
End With
Sheets("Filtered Sheet").Rows(50).PageBreak = xlPageBreakManual
Sheets("Filtered Sheet").Rows(100).PageBreak =
xlPageBreakManual
Sheets("Filtered Sheet").Rows(150).PageBreak = xlPageBreakManual
End Sub
This might not be what you are looking for but it may be of some help
to you.
Thanks
S
|