Logo 
Search:

MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

Speed Up VBA

  Asked By: Darcy    Date: Mar 11    Category: MS Office    Views: 795
  

Is there a way to speed up VBA?
Maybe compile it or ???
Even with Screen Updating and Calculate turned off, it still takes forever.

Share: 

 

4 Answers Found

 
Answer #1    Answered By: Jacqueline Long     Answered On: Mar 11

Most things done with VBA are short enough that execution time is not a problem
unless they are written in a very inefficient way.

Are you doing huge amounts of computation?

Care to post the appropriate parts of your code? There might be some
inefficiencies that can be eliminated easily.

 
Answer #2    Answered By: Joe Evans     Answered On: Mar 11

their are several methods that can increase the speed  of the macro....even if
u assign a Null string as VbNullstring
eg MyVar = "" better MyVar=VbNullstring

Wait for few days I'm going to publish a White Paper on this VBA perfomace and
optimization.

 
Answer #3    Answered By: Mable Stone     Answered On: Mar 11

If you publish this kind of a web page,it would be very helpful for me.
Because,sometimes i'm making some codes which are not so efficient. Even
ScreenUpdating = False or ActiveWindow.Application.Visible=False is not
equalizing these speed  problems.

 
Answer #4    Answered By: Guillermo Cox     Answered On: Mar 11

If your vba  alters a cell value the whole spreadsheet will recalc. If the
spreadsheet is slow at recalcing this may cause speed  to reduce to a crawls.
One option, if this is the issue, is to turn recalc off  at the start of the
macro and on again at the end. This depends a bit on your algorithm, though.

 
Didn't find what you were looking for? Find more on Speed Up VBA Or get search suggestion and latest updates.




Tagged: