+ Reply to Thread
Results 1 to 4 of 4

Running VBA in excel is too slow, how to make it faster?

  1. #1
    Registered User
    Join Date
    11-17-2011
    Location
    Philippines
    MS-Off Ver
    MS Office 2010 to 2013
    Posts
    22

    Exclamation Running VBA in excel is too slow, how to make it faster?

    Hi I'm not an expert in VBA and is just trying to 'crawl' my way in finishing a project. I have a code for my command button (Button_Submit) and the code is below. The results are too slow before it come up. Can I make it faster? Please help.

    Please Login or Register  to view this content.

  2. #2
    Forum Expert OllieB's Avatar
    Join Date
    12-20-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2007 (home) & 2010 (office)
    Posts
    1,542

    Re: Running VBA in excel is too slow, how to make it faster?

    Replace all occurrences of

    Please Login or Register  to view this content.
    by

    Please Login or Register  to view this content.
    at the beginning of your routine you execute the following code without any purpose that I can identify - i.e. can be removed

    Please Login or Register  to view this content.
    If you like my contribution click the star icon!

  3. #3
    Registered User
    Join Date
    11-17-2011
    Location
    Philippines
    MS-Off Ver
    MS Office 2010 to 2013
    Posts
    22

    Re: Running VBA in excel is too slow, how to make it faster?

    at the beginning of your routine you execute the following code without any purpose that I can identify - i.e. can be removed
    i have two sheets that corresponds to the submit button, namely INFLOWS_WC and INFLOWS_PERSONAL, so basically i have records to input and the conditions above would determine to which sheet the records will be added.

    iRow = ws.Cells(ws.Rows.Count,"A").End(xlup).Row+1
    However, i tried this, and it made the execution so fast! This is what I need. Thanks for the help!

  4. #4
    Forum Expert OllieB's Avatar
    Join Date
    12-20-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2007 (home) & 2010 (office)
    Posts
    1,542

    Re: Running VBA in excel is too slow, how to make it faster?

    Quote Originally Posted by rsbuslon View Post
    i have two sheets that corresponds to the submit button, namely INFLOWS_WC and INFLOWS_PERSONAL, so basically i have records to input and the conditions above would determine to which sheet the records will be added.
    I know, but within the Select case statement you again execute the code to determine the first available row, so the first one at the top of the routine does not seem to be needed

+ 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