Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Print Range - VBA
Hi-
I use the following code to set my print range at the end of my macro. Thing is....over half the time it takes my macro to run is dedicated to this code. It takes about 15 seconds to run the macro....and 10 seconds of it is from this code. Is there a more efficient way to code my Print Range? Range("A1:A3").Select With ActiveSheet.PageSetup .PrintTitleRows = "$1:$3" .PrintTitleColumns = "" End With ActiveSheet.PageSetup.PrintArea = "" With ActiveSheet.PageSetup .LeftHeader = "" .CenterHeader = "" .RightHeader = "" .LeftFooter = "" .CenterFooter = "Page &P of &N" .RightFooter = "" .LeftMargin = Application.InchesToPoints(0.75) .RightMargin = Application.InchesToPoints(0.75) .TopMargin = Application.InchesToPoints(1) .BottomMargin = Application.InchesToPoints(1) .HeaderMargin = Application.InchesToPoints(0.5) .FooterMargin = Application.InchesToPoints(0.5) .PrintHeadings = False .PrintGridlines = True .PrintComments = xlPrintNoComments .PrintQuality = 600 .CenterHorizontally = True .CenterVertically = False .Orientation = xlLandscape .Draft = False .PaperSize = xlPaperLetter .FirstPageNumber = xlAutomatic .Order = xlDownThenOver .BlackAndWhite = False .Zoom = False .FitToPagesWide = 1 .FitToPagesTall = False .PrintErrors = xlPrintErrorsDisplayed End With Thanks, Chris |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Print range | Excel Discussion (Misc queries) | |||
print range won't print | Excel Discussion (Misc queries) | |||
Print Blank Pgs - Preview margins outside print range | Excel Discussion (Misc queries) | |||
Can you get the range reference for each page in a worksheet print range? | Excel Programming | |||
Excel 2000 VBA - Set Print Range in dynamic range | Excel Programming |