Clear or Remove Page Breaks in Excel
-
Tuesday, September 28, 2010 1:43 AM
Hi all,
I'm trying to figure out how to remove page breaks from my excel sheet through vb.net. I have a print area setup and it has vert and a hort page breaks in it and I cant remove them I've tried the following from other threads I've read. I pretty much got all the other stuff on my own now I'm looking for direction so I can correct it its the only thing holding me back now from finishing my project in vb.net and ya I'm still a beginner but I'm learning alot.
Hope I'm in the right spot for this if not please direct me to the right spot...sry
thx in advance,
mrggutz
xlWorkSheet_Picture.Cells.PageBreak = Excel.XlPageBreak.xlPageBreakNone xlWorkSheet_Picture.HPageBreaks.RemoveAt(0) "xlWorkSheet_Picture.PageSetup.PrintArea = "A1:M38"- Moved by Chao Kuo Wednesday, September 29, 2010 10:54 AM Excel automation (From:Visual Basic Express Edition)
All Replies
-
Saturday, October 02, 2010 2:51 PMWow that many views, a move and no replys. Someone must have alittle knowledge about this.
-
Saturday, October 02, 2010 4:52 PM
Hello,
Something like the following may resolve it:
ExcelApp.ActiveSheet.ResetAllPageBreaks()
Kind regards, Dennis (http://xldennis.wordpress.com/)- Marked As Answer by Bessie ZhaoModerator Tuesday, October 05, 2010 5:50 AM
-
Sunday, October 03, 2010 10:51 PM
I think it should be as simple as this:
ActiveSheet.ResetAllPageBreaks
-
Monday, October 04, 2010 10:11 AM
ryguy72,
The OP use VB.NET and therefore my code works and not Yours.
Dennis
Microsoft Excel MVP
Kind regards, Dennis (http://xldennis.wordpress.com/)

