Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / March 2008

Tip: Looking for answers? Try searching our database.

Setting Vertical Page Breaks

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
J.W. Aldridge - 21 Mar 2008 20:55 GMT
I asked this question earlier today, but may have scared people off
with how I worded the question. So, is there anyway to set the
vertical page break ranges after the print area has been established?

I would like set the page break at n51, n91, n131, etc.

Sub SetPrtAr_mysheet()
Dim lLastRow As Long
lLastRow = Range("I65536:K65536").End(xlUp).Row
Orientation = xlLandscape
ActiveSheet.PageSetup.PrintArea = Range("a6:N" & lLastRow).Address
End Sub

Thanx
JLGWhiz - 21 Mar 2008 21:13 GMT
Here is the syntax to add the vertical page breaks.   I have not used this,
so I don't know what this does to the automatic page breaks that are set in
the PageSetup exercise.  You probably should test this a little before trying
to implement it in full code.

ActiveSheet.VPageBreaks.Add Before:=ActiveCell

Substitute a Range reference for ActiveCell.  It looks like you might have
to do it more than once or loop with an array to do what you described.  
Anyhow, you can play with it.

> I asked this question earlier today, but may have scared people off
> with how I worded the question. So, is there anyway to set the
[quoted text clipped - 10 lines]
>
> Thanx
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.