Deleting automatic page breaks in excel 2003
Hello,
I have a problem concerning deleting automatic page breaks in excel 2003. I found this code in a previous discussion: Sub DeleteHPageBreaks() Dim pb As HPageBreak Dim lCount As Long For lCount = Sheet1.HPageBreaks.Count To 1 Step -1 Set pb = Sheet1.HPageBreaks(lCount) If pb.Type = xlPageBreakAutomatic Then pb.Delete Next lCount End Sub The code seems to work fine in previous excel versions, but not in 2003. Does anyone know how to solve this in excel 2003? I would appreciate your help! /Malin |
Deleting automatic page breaks in excel 2003
Deleting automatic pagebreaks is pretty much meaningless.
Just set displaypagebreaks to false and it will be just as effective. -- Regards, Tom Ogilvy "mLinn" wrote: Hello, I have a problem concerning deleting automatic page breaks in excel 2003. I found this code in a previous discussion: Sub DeleteHPageBreaks() Dim pb As HPageBreak Dim lCount As Long For lCount = Sheet1.HPageBreaks.Count To 1 Step -1 Set pb = Sheet1.HPageBreaks(lCount) If pb.Type = xlPageBreakAutomatic Then pb.Delete Next lCount End Sub The code seems to work fine in previous excel versions, but not in 2003. Does anyone know how to solve this in excel 2003? I would appreciate your help! /Malin |
All times are GMT +1. The time now is 04:42 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com