+ Reply to Thread
Results 1 to 3 of 3

How to make Excel VBA more efficient?

  1. #1
    Registered User
    Join Date
    06-09-2009
    Location
    Capitola, California
    MS-Off Ver
    Excel 2003
    Posts
    25

    How to make Excel VBA more efficient?

    I wrote some VBA code that works great, but in some instances, depending on what the user does, he or she has to wait maybe up to 10 seconds before they can proceed. This being a shared file I am sure slows everything down but if there are tips I could use to make it run faster, I would love to know about them.

    Thanks

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: How to make Excel VBA more efficient?

    Hi Mhni, post up your workbook, or at least your code (be sure to wrap your code in code tags). We'll take a look.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Expert
    Join Date
    10-10-2008
    Location
    Northeast Pennsylvania, USA
    MS-Off Ver
    Excel 2007
    Posts
    2,387

    Re: How to make Excel VBA more efficient?

    mhni,

    It could depend on your code.

    At the beginning of your code, after your "Dim" statements, enter:
    Application.ScreenUpdating = False


    And, at the end of your code, just beofe "End Sub", enter:
    Application.ScreenUpdating = True


    If would really help if we could see your code:

    At the beginning of your posted code, enter the following without the quote marks:
    ["code"]


    Your code goes here.


    At the end of your posted code, enter the following without the quote marks:
    ["/code"]


    Or, if you could attach a copy of your workbook - scroll down and see "Manage Attachments".
    Have a great day,
    Stan

    Windows 10, Excel 2007, on a PC.

    If you are satisfied with the solution(s) provided, please mark your thread as Solved by clicking EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

+ 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