Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Insert Page Break da Excel Discussion (Misc queries) 2 May 11th 09 07:05 PM
INSERT ROW AND PAGE BREAK jcontrer Excel Discussion (Misc queries) 0 May 15th 08 07:09 PM
cannot insert page break tsmanz Excel Discussion (Misc queries) 2 December 5th 05 05:45 PM
automatically insert row at each page break Row Excel Worksheet Functions 1 September 9th 05 04:35 PM
Insert Page Break Don Excel Discussion (Misc queries) 3 June 9th 05 08:32 PM


All times are GMT +1. The time now is 09:18 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"