View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.programming
Tushar Mehta Tushar Mehta is offline
external usenet poster
 
Posts: 1,071
Default Making code more efficient

[This followup was posted to microsoft.public.excel.programming with an
email copy to Tommi.
Please use the newsgroup for further discussion.]

In addition to the comments you've already received, consider
leveraging the XL object model whenever possible. Rather than use
loops to do whatever you are doing, use XL's objects/properties/methods
to speed up the process. In some cases, the results will be dramatic.

However, this is not easily explained in the abstract. If you were to
share some relevant code snippets...

--
Regards,

Tushar Mehta, MS MVP -- Excel
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions

In article , says...
Hello!
I have code, which manages lists (so the code will make heavy use of
for-loops, comparisons, sorting, filtering and that kind of stuff = quite
basic, but time-consuming).
Running my code will in some cases take quite a lot of time. In the
beginning of every procedure, I put Application.ScreenUpdating = False ( in
the end of procedure again True). I put also Application.Calculation =
xlCalculationManual in the beginning (and in the end again to Automatic).

Is there any other things, I should take into account, if I want my code run
more efficiently?

BR, Tommi