Consulting

Results 1 to 6 of 6

Thread: Slow code

  1. #1
    VBAX Newbie
    Joined
    Jan 2021
    Posts
    4
    Location

    Slow code

    Attached is a workbook which is working very well thanks to forums such as these. My only issue is that the code seems to run very slowly when importing and moving the data. I have added code to turn off automatic calculation and stop screen updating however it still runs very slowly. Can anyone offer any additional suggestions to help this code run quickly? I greatly appreciate the help.
    Attached Files Attached Files

  2. #2
    Knowledge Base Approver VBAX Wizard
    Joined
    Apr 2012
    Posts
    5,642
    Why do you protect the code you want us to analyze ?

  3. #3
    VBAX Newbie
    Joined
    Jan 2021
    Posts
    4
    Location
    Oh I'm sorry, I forgot it was locked. The password is Nuco123. Thank you for letting me know.

  4. #4
    Knowledge Base Approver VBAX Wizard
    Joined
    Apr 2012
    Posts
    5,642
    I prefer a file without any protection. Please replace it.

  5. #5
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,724
    Location
    Quote Originally Posted by Scoti261 View Post
    Oh I'm sorry, I forgot it was locked. The password is Nuco123. Thank you for letting me know.
    OK - not a big deal

    However, it looks like a lot of macros, and some seem to require a file or files to be opened to gather external data

    Without everything (files, data in this WB, instructions on how to use your WB, etc. needed to test, it'll be very hard

    The best I can think of is to just do a code review on the macro that seems to be slow.
    ---------------------------------------------------------------------------------------------------------------------

    Paul


    Remember: Tell us WHAT you want to do, not HOW you think you want to do it

    1. Use [CODE] ....[/CODE ] Tags for readability
    [CODE]PasteYourCodeHere[/CODE ] -- (or paste your code, select it, click [#] button)
    2. Upload an example
    Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) / Upload Files / Done
    3. Mark the thread as [Solved] when you have an answer
    Thread Tools (on the top right corner, above the first message)
    4. Read the Forum FAQ, especially the part about cross-posting in other forums
    http://www.vbaexpress.com/forum/faq...._new_faq_item3

  6. #6
    Knowledge Base Approver VBAX Wizard p45cal's Avatar
    Joined
    Oct 2005
    Location
    Surrey UK
    Posts
    5,873
    You have several pictures of other ranges (Received Sample Viewer). I've found these to slow up a workbook significantly. Try temporarily or permanently deleting them and see if you get more speed.
    p45cal
    Everyone: If I've helped and you can't be bothered to acknowledge it, I can't be bothered to look at further posts from you.

Posting Permissions

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