View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Leith Ross[_356_] Leith Ross[_356_] is offline
external usenet poster
 
Posts: 1
Default ActiveSheet.HPageBreaks not working


Hello Al,

I am using Excel 2000 on Windows XP. This code should work on you
system as well. Just make sure when you set the print area it include
Row 139.


Code
-------------------

' Remove all manual page breaks
ActiveSheet.ResetAllPageBreaks
' We set-up important PageSetup parameters set at beginning,
' so just set PrintArea
With ActiveSheet.PageSetup
.PrintArea = PA_PrintRange
End With
With ActiveSheet.HPageBreaks
' Force specific horizontal page breaks
.Add .Range("B53") ' Page 1
.Add .Range("B96") ' Page 2
.Add .Range("B139") ' Page 3
End With

-------------------


Sincerely,
Leith Ros

--
Leith Ros
-----------------------------------------------------------------------
Leith Ross's Profile: http://www.excelforum.com/member.php...fo&userid=1846
View this thread: http://www.excelforum.com/showthread.php?threadid=49203