Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I have created a subtotal with page breaks. I insert a row after the subtotal to insert some headers. The problem is that the new row always before the page break appears. Can anyone help me for this ? Thanks a lot in advance Benjamin |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() OK. Lets say you've inserted your subtotals and then manually inserted a row below each of these subtotals. You now have a series of blank rows where you want to insert your new header. So... Highlight the active cells in column A (assuming column A is the column you performed your subtotals on) then try this. It should insert a page break above each blank row. Sub PB() ' 'Inserts page break BEFORE each blank row ' For Each cell In Selection If cell = "" Then ActiveSheet.HPageBreaks.Add cell End If Next cell End Sub Hope it works! Lee Benlejedi wrote: *Hi, I have created a subtotal with page breaks. I insert a row after the subtotal to insert some headers. The problem is that the new row always before the page break appears. Can anyone help me for this ? Thanks a lot in advance Benjamin * -- roundabout ------------------------------------------------------------------------ Posted via http://www.mcse.ms ------------------------------------------------------------------------ View this thread: http://www.mcse.ms/message2512130.html |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Insert Page Break | Excel Discussion (Misc queries) | |||
INSERT ROW AND PAGE BREAK | Excel Discussion (Misc queries) | |||
insert page break | Excel Programming | |||
cannot insert page break | Excel Discussion (Misc queries) | |||
Insert Page Break | Excel Discussion (Misc queries) |