Print settings with Macro - Speed


Board Regular
Mar 4, 2002
I have a file where I am making multiple similiar sheets. I am using the following code to set the print settings of each page:

With ActiveSheet.PageSetup
.PrintTitleRows = "$1:$10"
End With
ActiveSheet.PageSetup.PrintArea = "$A$1:$P$71"
With ActiveSheet.PageSetup
.LeftFooter = "&""Arial,Bold""&8Page &P of &N"
.RightFooter = "&""Arial,Bold""&8Printed on &D at &T"
.LeftMargin = Application.InchesToPoints(0.6)
.RightMargin = Application.InchesToPoints(0)
.TopMargin = Application.InchesToPoints(0.4)
.BottomMargin = Application.InchesToPoints(0.5)
.HeaderMargin = Application.InchesToPoints(0.25)
.FooterMargin = Application.InchesToPoints(0)
.PrintQuality = 600
.CenterHorizontally = True
.CenterVertically = False
.Orientation = xlPortrait
.PaperSize = xlPaperLetter
.FirstPageNumber = xlAutomatic
.Order = xlDownThenOver
.BlackAndWhite = False
.Zoom = 92
.PrintErrors = xlPrintErrorsDisplayed

This is working very slow and since it has to be done for every sheet, it is taking way to long. I would appreciate any advice on how to increase the speed.

Thanks .

Some videos you may like

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.

Watch MrExcel Video

Forum statistics

Latest member

This Week's Hot Topics

  • Timer in VBA - Stop, Start, Pause and Reset
    [CODE=vba][/CODE] Option Explicit Dim CmdStop As Boolean Dim Paused As Boolean Dim Start Dim TimerValue As Date Dim pausedTime As Date Sub...
  • how to updates multiple rows in muliselect listbox
    Hello everyone. I need help with below code. code is only chaning 1st row in mulitiselect list box. i know issue with code...
  • Delete Row from Table
    I am trying to delete a row from a table using VBA using a named range to find what I need to delete. My Range is finding the right cell. In the...
  • Assigning to a variable
    I have a for each block where I want to assign the value in column 5 of the found row to the variable Serv. [CODE=vba] For Each ws In...
  • Way to verify information
    Hi All, I don't know what to call this formula, and therefore can't search. I have a spreadsheet with information I want to reference...
  • Active Cell Address – Inactive Sheet
    How to use VBA to get the cell address of the active cell in an inactive worksheet and then place that cell address in a location on the current...