LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
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

 
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
activesheet.tab.colorindex not working when workbook shared Martin Appleton Excel Discussion (Misc queries) 0 July 21st 06 08:45 AM
Working with Macros-Activesheet.Paste lunar1085 Excel Discussion (Misc queries) 0 February 3rd 06 04:13 PM
ACTIVESHEET.PASTE not working. Marco Excel Programming 3 July 27th 05 02:11 AM
Macro working in background ie not on activesheet Dynamiteskippy Excel Programming 1 May 28th 05 03:53 AM
ActiveSheet.Next.Select not working! Ron McCormick[_2_] Excel Programming 2 December 15th 03 12:42 PM


All times are GMT +1. The time now is 06:42 AM.

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

About Us

"It's about Microsoft Excel"