View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Alex St-Pierre Alex St-Pierre is offline
external usenet poster
 
Posts: 169
Default Improve Speed by desabling Automatic Calculation

I have a Macro which update an excel sheet (by opening an other excel file
and copy-paste data) When I update the file, the macro takes about 1 sec. to
execute.

Often, I have an other sheet which is linked to the updated excel sheet; it
takes about 2 minutes to execute the Macro.

I decided to desabled automatic calculation by doing:
Application.Calculation = xlManual
'Program..
Application.Calculation = xlAutomatic
Application.Calculate ('this doesn't affect the speed.. very fast)

After doing this, the Macro takes 10 seconds to execute.
If I break down the link, it takes 1 second.

Why the Macro doesn't 1 second if I desables automatic calculation ?
Is there a way to execute my Macro in 1 second by suspending all excel
refresh ?

Thank you!
--
Alex St-Pierre