+ Reply to Thread
Results 1 to 6 of 6

Help to speed up code

  1. #1
    Registered User
    Join Date
    01-06-2012
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    26

    Help to speed up code

    I have a userform and based on the selections from the combobox selections the macro adds the data to the next blank row of the form.selected worksheet. The trouble is the few seconds it lags to do this. I had some code that did almost this same thing but instant, the problem was the information wasn't getting placed into the correct row of the sheet. This one does it correctly but a huge difference in the time it runs through the code. Any suggestions or help is greatly appreciate. Thanks in advance.

    Please Login or Register  to view this content.

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,447

    Re: Help to speed up code

    Hi saintsphan,

    Here are some links:
    http://www.cpearson.com/excel/optimize.htm
    http://www.excelitems.com/2010/12/op...er-macros.html

    Turning off ScreenUpdating is the easiest and recommended the most.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Registered User
    Join Date
    01-06-2012
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    26

    Re: Help to speed up code

    Thank you for the quick response. I tried your suggestion of turning off ScreenUpdating but got the same results. I think the issue is the Loop I have, which is searching for the first empty cell in column A after A13 to copy the users input to. Im sure there is a way to speed this part up I just don't know what it is... suggestion ?

    Please Login or Register  to view this content.

    Quote Originally Posted by MarvinP View Post
    Hi saintsphan,

    Here are some links:
    http://www.cpearson.com/excel/optimize.htm
    http://www.excelitems.com/2010/12/op...er-macros.html

    Turning off ScreenUpdating is the easiest and recommended the most.

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Help to speed up code

    Why create the union?

    Please Login or Register  to view this content.
    Entia non sunt multiplicanda sine necessitate

  5. #5
    Registered User
    Join Date
    01-06-2012
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    26

    Re: Help to speed up code

    I don't recall why that was in there.. I removed it add added the screenupdating back in and its a bit faster.. Still not instant like the other code I had but maybe that code wasn't looping, hence why I changed it. Thanks for the guidance. Ill mark this as solved unless you can think of anything else. Thanks again.

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Help to speed up code

    You're welcome.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Can someone help speed up my code?
    By Ppessina in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 08-21-2013, 06:26 PM
  2. [SOLVED] How to Speed Up the code ?
    By joh46k in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-03-2013, 09:42 PM
  3. How to speed up this code
    By Surreall in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 01-12-2013, 10:26 AM
  4. speed up code
    By Pindacko in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-02-2007, 01:12 AM
  5. Ned to speed up my code
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-14-2006, 01:15 PM

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