View Single Post
 
Old 05-20-2011, 10:12 AM
Catalin.B Catalin.B is offline Windows Vista Office 2007
Expert
 
Join Date: May 2011
Location: Iaşi, Romānia
Posts: 386
Catalin.B is on a distinguished road
Default

Sorry, previous post deletes the second page AND the first row of the third page
This one works ok. ( from my point of view )
Sub DeletePage()

ActiveWindow.View = xlPageBreakPreview
Range(Rows(ActiveSheet.HPageBreaks(1).Location.Row ), Rows(ActiveSheet.HPageBreaks(2).Location.Row - 1)).EntireRow.Delete


End Sub
Reply With Quote