Thread: speed up macros
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
JE McGimpsey JE McGimpsey is offline
external usenet poster
 
Posts: 4,624
Default speed up macros

That trick works if you're not sure you need to set the property
(otherwise it's no faster than just setting the property).

You can get significantly improved performance over individual VBA
commands using XL4M, especially if you have multiple .pagesetup
properties to set:


http://www.mcgimpsey.com/excel/udfs/pagesetup.html




In article ,
"Bob Flanagan" wrote:

Dave, the trick is to only change the pagesetup properties that need
changing. For example:

if .LeftHeader < "&8&F" then .LeftHeader = "&8&F"

This will make the code fly as checking a property is lightning fast, and
you only change the ones you need to change.