Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Vertical page breaks - one per column | Excel Worksheet Functions | |||
Vertical page breaks won't drag in Page Break Preview | Excel Discussion (Misc queries) | |||
Setting page breaks (another) | Excel Programming | |||
Count number of manual and automatic vertical page breaks - examples | Excel Programming | |||
Moving Vertical Page Breaks in Excel via VB | Excel Programming |