Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 425
Default Setting Vertical Page Breaks

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default Setting Vertical Page Breaks

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 Befo=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.

"J.W. Aldridge" wrote:

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

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
Vertical page breaks - one per column Staceyglow Excel Worksheet Functions 1 January 8th 10 11:35 PM
Vertical page breaks won't drag in Page Break Preview Caroline Excel Discussion (Misc queries) 0 July 14th 09 12:19 PM
Setting page breaks (another) Ian W[_2_] Excel Programming 1 March 15th 05 12:23 PM
Count number of manual and automatic vertical page breaks - examples DataFreakFromUtah Excel Programming 0 January 13th 04 03:52 PM
Moving Vertical Page Breaks in Excel via VB steveokur Excel Programming 5 October 30th 03 09:11 PM


All times are GMT +1. The time now is 10:09 AM.

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"