![]() |
How to Programmatically Insert a Page Break Every Nth Row in a Range
Sub InsertPBreakEveryNthRow()
Dim i As Integer For i = 2 To ActiveSheet.UsedRange.Rows.Count If i Mod 8 = 1 Then Worksheets("Sheet1").Rows(i).PageBreak = xlPageBreakManual End If Next End Sub |
All times are GMT +1. The time now is 08:43 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com