Logo 
Search:

MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

How to increase the speed of the Excel Macro?

  Asked By: Anpu    Date: Feb 25    Category: MS Office    Views: 2986
  

Is there any way to increase the speed of the Excel Macro code by utilizing the
maximum processor resource. May be by halting other programs opened say like
Outlook, IE, MS Word etc.

I'm asking something like, if the antivirus is running it will utilize most of
the processor resource and other programs will work slowly. Like that will it be
possible with some sort of code in macro to run fastly.

Share: 

 

3 Answers Found

 
Answer #1    Answered By: Guilherme Silva     Answered On: Feb 25

You could certainly stop other things running, so as to make more processor
cycles available to Excel. But you'd have to do this yourself - Excel
can't.

> if the antivirus is running  it will utilize most of the processor resource

If you mean that the antivirus engine is actually running a full machine
scan, then yes it will use considerable resources, and should normally only
be run  when you aren't using the machine for anything else.

If you mean that the antivirus engine is not running a full machine scan,
but is still utilising most of the processor resources, then look at
changing your antivirus engine.

The normal thing that slows down VBA code  to unacceptable levels is having
Excel update the screen whenever the code changes a value of a cell on the
screen and/or changes the focus. You should turn screen updating off while
the code runs.

Another one that soaks resources is auto-calc. You should turn this off
when running code in a spreadsheet that has lots of formulas. Then turn it
back on at the end, and also force a recalculate of the sheet.

Getting these two right can speed  up VBA execution by an enormous amount.

 
Answer #2    Answered By: James Evans     Answered On: Feb 25

These two advise is really remarkable:

1)Turn off Auto Calculations
2)Turn off screen updating

But I want to know if there's a third advise something like making code
executable.
I mean as you know in VB you can make it *.exe . Is it possible to make it in
VBA? I think if it's possible, the speed  will increase.

 
Answer #3    Answered By: Clarence Nichols     Answered On: Feb 25

This a link http://www.mvps.org/dmcritchie/excel/slowresp.htm
Which can be helpfull to get your work  done.
Belive me it works

 
Didn't find what you were looking for? Find more on How to increase the speed of the Excel Macro? Or get search suggestion and latest updates.




Tagged: