+ Reply to Thread
Results 1 to 4 of 4

Macro running slow?

  1. #1
    Registered User
    Join Date
    04-22-2013
    Location
    Indonesia
    MS-Off Ver
    Excel 2010
    Posts
    2

    Macro running slow?

    Hi all,

    this is my first time posting and I'm a beginner at programming macros in Excel, so please go easy on me!

    What I'm trying to do is creating a warehouse/inventory system. Here's how it works:

    "Inventory List" sheet shows all items in the warehouse and flagged when it needs to be restocked.
    "Inventory Pick History" shows a record of items going in and out of the warehouse.

    To use the form, fill in all the yellow colored cell in "Inventory Pick History". SKU field should match the ones available in "Inventory List", then the description and other fields should be filled automatically.
    After filling all the yellow cells, click "INPUT", then the macro will run. Here's the problem. The macro is working as I intended, but it is incredibly slow.

    Below is the code for the macro:

    Please Login or Register  to view this content.
    Basically what it does is add a new row at the end of the table, fill in all the data from the yellow cells, and updates the quantity in the item list. I am using a pretty good computer (its running CAD programs just fine). MS Excel 2010, Windows 7 64-bit. I attached the file also if anyone would like to take a look at it.

    Warehouse Inventory Trial.xlsm

    I tried looking it up online but still haven't got a clue why this is the case. Thank you for your help/advice in advance!
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    12-19-2011
    Location
    Central Europe
    MS-Off Ver
    Excel O365
    Posts
    361

    Re: Macro running slow?

    Hi there

    Try using

    Application.ScreenUpdating = False at the begining for your code

    Application.ScreenUpdating = True at the end of your code

    i.e.

    Please Login or Register  to view this content.

  3. #3
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Macro running slow?

    hi vylette, the code can be shortened down basing on the posted code without seeing the file (I could not open it)

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    04-22-2013
    Location
    Indonesia
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Macro running slow?

    It doesn't seem to do anything? It still lags after I hit the button...

+ 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