+ Reply to Thread
Results 1 to 4 of 4

making code more Efficient !!! please help

  1. #1
    Registered User
    Join Date
    07-27-2011
    Location
    Santiago, Dominican Republic
    MS-Off Ver
    Excel 2010
    Posts
    5

    making code more Efficient !!! please help

    Hello,
    I'm using this code to verify values, and copy cells from one sheet to another in the same workbook...... the code works fine. but is really slow and Inefficient.

    can you help me make the code run better.


    Please Login or Register  to view this content.

    Thanks
    virgiliocabrera
    Last edited by Leith Ross; 08-01-2011 at 06:58 PM.

  2. #2
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: making code more Efficient !!! please help

    virgiliocabrera,

    Give the following a try:
    Please Login or Register  to view this content.


    Hope that helps,
    ~tigeravatar

  3. #3
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: making code more Efficient !!! please help

    One thing that really accelerate a macro is to stop the screen updating at the beginning of the code and reactivating it at the end.

    Please Login or Register  to view this content.

  4. #4
    Valued Forum Contributor gjlindn's Avatar
    Join Date
    08-01-2011
    Location
    Dodgeville, WI
    MS-Off Ver
    Excel 2003, 2007, 2010, 2013
    Posts
    369

    Smile Re: making code more Efficient !!! please help

    I would use a combination of tigeravatar's excellent code and p24leclerc's suggestion of disabling the screen updating, but would also disable calculations and worksheet events which, if exist, can cause looping issues. I wouldn't just say off and on though. I've made it a habit of getting the existing settings and then restoring them at the end of the routine. If you've ever called other routines from another, you'll understand why this could be important. Thanks!

    -Greg

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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