View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Greg Wilson[_3_] Greg Wilson[_3_] is offline
external usenet poster
 
Posts: 35
Default Slow Response time

I checked it out and got a similar time as you. I guess
that's just the way it is.

Mike's suggestion of turning off the screen updating
produced a significant but modest improvement of about 2
seconds. In my trials, changing the range references from
named ranges to specified ranges surprisingly returned a
slightly slower time by about 1 second. What did produce
a dramatic improvement was reduction of code.

Can you not eliminate most of the code? It seems to me
that most of the code is unnecessary. It looks like
you're essentially quoting the macro recorder.


Regards,
Greg

-----Original Message-----
The following code takes about 20 to 30 seconds to run

in Excel 98. Why and
how can I speed it up?

With ActiveSheet.PageSetup
.PrintArea = ActiveWorkbook.Names.Item("onhand")
.PrintTitleColumns = ActiveWorkbook.Names.Item

("onhandheading")
.LeftMargin = Application.InchesToPoints(0.5)
.RightMargin = Application.InchesToPoints(0.5)
.TopMargin = Application.InchesToPoints(0.5)
.BottomMargin = Application.InchesToPoints(0.5)
.PrintHeadings = False
.PrintGridlines = False
.PrintComments = xlPrintNoComments
.PrintQuality = 600
.CenterHorizontally = True
.CenterVertically = False
.Orientation = xlLandscape
.Draft = False
.PaperSize = xlPaperLetter
.FirstPageNumber = xlAutomatic
.Order = xlDownThenOver
.BlackAndWhite = False
.Zoom = 80
End With
ActiveWindow.SelectedSheets.PrintOut


--
Carl & Linda Brehm
Lake Lafourche Bird House
Hebert, LA
Keets, Tiels, GN & Red Lories, Quakers
Mitred Conures, TAG's,DYH, Bourkes,
Cages, Toys, Toy parts Wholesale/Retail
Feed & Supplies


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.504 / Virus Database: 302 - Release Date:

07/24/2003


.