I have macro script, which is working well be said file taken much time to execute,
please help me to reduce time of execution.
Ravi
===
![]()
Please Login or Register to view this content.
====
I have macro script, which is working well be said file taken much time to execute,
please help me to reduce time of execution.
Ravi
===
![]()
Please Login or Register to view this content.
====
Last edited by JBeaucaire; 05-27-2013 at 08:26 AM. Reason: Added CODE tags, as per Forum Rules. Take a moment to read the Forum Rules in the menu bar above. Thanks.
Ravi,
I don't know your level of expertise, but did you try putting
Application.ScreenUpdating = FALSE
at the very beginning of your code and then
Application.ScreenUpdating = TRUE
at the very end?
Also, you don't have to first select a cell to change its value. You can change it directly, without selecting it.
For example, if you want "contractorcode" in Cell A1, then instead of
Range("A1").Select
ActiveCell.FormulaR1C1 = "contractorcode"
just
Range("a1") = "contractorcode"
will work fine and from what I've read, will be faster.
Here's a couple of websites that have a few good tips on optimizing vba macros.
http://chandoo.org/wp/2012/03/22/vba...on-techniques/
http://www.ozgrid.com/VBA/SpeedingUpVBACode.htm
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks