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: 11
Default need to speed up some page formatting code

Hi,

I was wondering if there is a better way of running the following code
because as it is, it is really slowing up the macro i am creating. I will
need to run this code on approximately 20 sheets, but not all the sheets are
the same so i can't just select all the sheets at the same time and do it
that way. So the following set of code gets run whenever one of the 20 sheets
gets created.

Does anyone have any pointers?

thanks in advance!

Worksheets(1).Cells.Font.Name = "Arial Narrow"
Worksheets(1).Columns("A:A").ColumnWidth = 1.5
Worksheets(1).Columns("B:C").ColumnWidth = 16
Worksheets(1).Columns("D:O").ColumnWidth = 10
Worksheets(1).Columns("D:O").NumberFormat = "_(* #,##0_);_(* (#,##0);_(*
""-""_);_(@_)"
Worksheets(1).Rows("1:9").NumberFormat = "General"
With Worksheets(1).PageSetup
.LeftHeader = ""
.CenterHeader = ""
.RightHeader = ""
.LeftFooter = ""
.CenterFooter = ""
.RightFooter = ""
.LeftMargin = Application.InchesToPoints(0.4)
.RightMargin = Application.InchesToPoints(0.4)
.TopMargin = Application.InchesToPoints(0.5)
.BottomMargin = Application.InchesToPoints(0.5)
.HeaderMargin = Application.InchesToPoints(0.5)
.FooterMargin = Application.InchesToPoints(0.5)
.PrintHeadings = False
.PrintGridlines = False
.PrintComments = xlPrintNoComments
'.PrintQuality = -3
.CenterHorizontally = False
.CenterVertically = False
.Orientation = xlLandscape
.Draft = False
.PaperSize = xlPaperLetter
.FirstPageNumber = xlAutomatic
.Order = xlDownThenOver
.BlackAndWhite = False
.Zoom = 80
'.PrintErrors = xlPrintErrorsDisplayed
End With
 
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
Need to Speed Up A Code LostInNY Excel Worksheet Functions 2 July 20th 09 06:18 PM
Ned to speed up my code [email protected] Excel Programming 4 June 14th 06 06:11 PM
Speed up Code? Sige Excel Programming 4 July 27th 05 06:21 PM
Speed up code Derick Hughes Excel Programming 0 February 8th 05 04:18 PM
Code Speed Up lists[_2_] Excel Programming 3 August 10th 04 12:06 PM


All times are GMT +1. The time now is 02:06 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"