Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Removing HPageBreaks frrom Ranges

Hi can someone help me here

I'm setting HPageBreaks in predined places
however when I look at the PrintPreview
I can see other breaklines which are broken lines
How do I get rid of these.

Here's the code I'm using

..ResetAllPageBreaks
.PageSetup.PrintArea = ""
.PageSetup.PrintTitleRows = ""
.PageSetup.PrintTitleColumns = ""
.PageSetup.PrintArea = ActiveSheet.Range(Cells(6, startCol),
Cells(lastRow, stopCol)).Address
.PageSetup.PrintTitleRows = "$1:$6"
.PageSetup.PrintTitleColumns = colTiCh



.HPageBreaks.Add Befo=.Range("A44")
.HPageBreaks.Add Befo=.Range("A62")

VbreakCount = .VPageBreaks.Count
HbreakCount = .HPageBreaks.Count

For i = 1 To HbreakCount
For j = 1 To VbreakCount
Set numHBreaks = .HPageBreaks(i).Location
Set numVBreaks = .VPageBreaks(j).Location
Next j
Next i


thanks for any help

Subs


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Removing HPageBreaks frrom Ranges

Those are probably automatic pagebreaks. Those appear when the printer
settings/page setup dictate that a pagebreak must appear at that location
(if you print, the printer will break at that location). .

Unless you change your settings, you can not get rid of them.

--
Regards,
Tom Ogilvy

"Subs" wrote in message
...
Hi can someone help me here

I'm setting HPageBreaks in predined places
however when I look at the PrintPreview
I can see other breaklines which are broken lines
How do I get rid of these.

Here's the code I'm using

.ResetAllPageBreaks
.PageSetup.PrintArea = ""
.PageSetup.PrintTitleRows = ""
.PageSetup.PrintTitleColumns = ""
.PageSetup.PrintArea = ActiveSheet.Range(Cells(6, startCol),
Cells(lastRow, stopCol)).Address
.PageSetup.PrintTitleRows = "$1:$6"
.PageSetup.PrintTitleColumns = colTiCh



.HPageBreaks.Add Befo=.Range("A44")
.HPageBreaks.Add Befo=.Range("A62")

VbreakCount = .VPageBreaks.Count
HbreakCount = .HPageBreaks.Count

For i = 1 To HbreakCount
For j = 1 To VbreakCount
Set numHBreaks = .HPageBreaks(i).Location
Set numVBreaks = .VPageBreaks(j).Location
Next j
Next i


thanks for any help

Subs




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
Removing Named Ranges WINS Excel Discussion (Misc queries) 4 February 2nd 09 06:39 PM
HPageBreaks.Add GeorGeorGe Excel Worksheet Functions 0 February 9th 05 09:31 PM
HPageBreaks oddities... Alex T Excel Programming 3 June 8th 04 02:01 PM
Can't set manual HPageBreaks J.E. McGimpsey Excel Programming 0 July 15th 03 03:52 PM
Can't set manual HPageBreaks J.E. McGimpsey Excel Programming 1 July 14th 03 08:12 PM


All times are GMT +1. The time now is 11:48 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"