Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub AddBreaks()
With ActiveSheet For Each NamedRange In Names 'remove the equal sign addr = Mid(NamedRange.RefersTo, 2) StartRow = Range(addr).Row NumRows = Range(addr).Rows.Count EndRow = StartRow + NumRows - 1 .HPageBreaks.Add Befo=Range("A" & (EndRow + 1)) Next NamedRange End With End Sub "Chris Salcedo" wrote: I have a sheet that has about 110 named ranges in it. They are about 15 rows tall (they can vary). What I would like to do is when I go to print (11x17) a named range will not get cut off (i.e. part on one page and part on the next page) Like a keep together. A macro that would insert the page breaks on the sheet would work great. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel 2007 Page Break Adjustments causes a page break each cell | Excel Worksheet Functions | |||
return what page a named range is on | Excel Programming | |||
Show only matches between a named cell range and the values in a page field - vba | Excel Programming | |||
adding a new page break to an existing page break | Excel Discussion (Misc queries) | |||
How to Programmatically Insert a Page Break Every Nth Row in a Range | Excel Programming |