LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 45
Default Slow PageSetup macro

I need to loop through about 20 worksheets in one file and format them all
the same way. I basically just turned on the macro recorder to record the
steps it takes to format one sheet. My macro works great except that is
spends a long time on the PageSetup section.

Does anyone have any idea why the code below takes so long to run or a
suggestion for a better way to accomplish the same thing?
With ActiveSheet.PageSetup
.PrintTitleRows = "$1:$1"
.PrintTitleColumns = ""
End With
With ActiveSheet.PageSetup
.CenterHeader = "&A"
.CenterFooter = "Page &P"
.LeftMargin = Application.InchesToPoints(0.25)
.RightMargin = Application.InchesToPoints(0.25)
.TopMargin = Application.InchesToPoints(0.5)
.BottomMargin = Application.InchesToPoints(0.5)
.HeaderMargin = Application.InchesToPoints(0.25)
.FooterMargin = Application.InchesToPoints(0.25)
.PrintGridlines = True
.CenterHorizontally = True
.Orientation = xlPortrait
.Zoom = 100
End With

Thank you for your help,
Judy

 
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
PageSetup is very slow Howard Kaikow Excel Programming 1 June 26th 08 03:46 AM
PageSetup is very slow Howard Kaikow Excel Programming 2 May 17th 08 05:57 PM
Why is this PageSetup Macro So Slow? [email protected] Excel Discussion (Misc queries) 6 July 19th 05 09:28 PM
PageSetup is slow Christof DB Excel Programming 4 December 5th 03 04:09 PM
PageSetup slow Oliver Chiu Excel Programming 1 July 10th 03 02:06 PM


All times are GMT +1. The time now is 11:40 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"