Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default 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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
When automatic page breaks are moved each cell becomes a new page Queso hotmail com> Excel Discussion (Misc queries) 0 March 30th 10 03:08 AM
how can i delete automatic page breaks in excel jo New Users to Excel 1 July 30th 08 05:03 PM
deleting automatic page breaks Bill Craig Excel Worksheet Functions 1 April 11th 08 06:41 PM
Automatic page breaks in Excell 2003 Novice Excel Discussion (Misc queries) 2 February 21st 05 09:59 PM
How do I stop automatic page breaks in excel Lesley Hutchinson Excel Worksheet Functions 0 October 31st 04 12:49 PM


All times are GMT +1. The time now is 08:52 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"