Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Ok I know this code is wrong and correct to an extent. On first run (on
any particular sheet) it come up with an error on the SET and just breaks the page into 3. on the second run it sets the page breaks. pretty much what i am tring to do is get it so this macro will be assigned to a buttn you press the button and regardless of what the users have done to the print layout it will set it to 3 pages high with the pages breaks in the correct places. Sub actuals() Sheet12.PageSetup.PrintArea = "$A$1:$AQ$215" With Sheet12.PageSetup .FitToPagesWide = 1 .FitToPagesTall = 3 End With Sheet12.ResetAllPageBreaks Sheet12.HPageBreaks(1).Location = Range("A68", "A141") Sheet12.HPageBreaks(2).Location = Range("A141", "A215") Set Sheet12.HPageBreaks(1).Location = Range("A68", "A141") Set Sheet12.HPageBreaks(2).Location = Range("A141", "A215") End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Margins & print preview | Excel Worksheet Functions | |||
Print Blank Pgs - Preview margins outside print range | Excel Discussion (Misc queries) | |||
How do I change print margins? | Excel Discussion (Misc queries) | |||
Excel Print Margins | Setting up and Configuration of Excel | |||
Print margins on forms | Excel Discussion (Misc queries) |