+ Reply to Thread
Results 1 to 4 of 4

Want to reduce Macro running time

  1. #1
    Registered User
    Join Date
    05-08-2011
    Location
    India, Mumbai
    MS-Off Ver
    Excel 2010
    Posts
    59

    Smile Want to reduce Macro running time

    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.

  2. #2
    Forum Contributor
    Join Date
    10-13-2012
    Location
    Southern California
    MS-Off Ver
    Excel 2007
    Posts
    401

    Re: Want to reduce Macro running time

    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?

  3. #3
    Forum Contributor
    Join Date
    10-13-2012
    Location
    Southern California
    MS-Off Ver
    Excel 2007
    Posts
    401

    Re: Want to reduce Macro running time

    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.

  4. #4
    Forum Contributor
    Join Date
    10-13-2012
    Location
    Southern California
    MS-Off Ver
    Excel 2007
    Posts
    401

    Re: Want to reduce Macro running time

    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

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1