removing automatic page breaks with VBA code


Posted by Dave S on February 07, 2002 10:13 AM

Is there some code I can use to remove ALL page breaks from a page? Currently, I can remove all manual breaks with Cells.PageBreak =xlPageBreakNone, but after doing that excel puts in automatic page breaks. Oh! I just had an idea! Maybe I'll set the page to a very small size so that it won't insert automatic page breaks, insert my breaks manually, and then resize the page. Is there any other way to do this?

Thanks for the help!

Dave



Posted by Titus on February 07, 2002 5:37 PM


With ActiveSheet.PageSetup
.Zoom = False
.FitToPagesTall = 1
.FitToPagesWide = 1
End With