+ Reply to Thread
Results 1 to 6 of 6

Why is this block of code taking so long to process?

  1. #1
    Forum Contributor
    Join Date
    12-15-2009
    Location
    Herndon, VA
    MS-Off Ver
    Excel 2010
    Posts
    163

    Why is this block of code taking so long to process?

    I am filtering on 'ZZZ' then deleting the rows that show. When I set this up, it worked quickly like it should. Now all of a sudden it is taking for ever. A few lines above I added some With statements. I noticed the problem after that. so there is code before and after the code below in my procedure.

    Please Login or Register  to view this content.

    When I take out this code in it's own procedure, it executes right away. Why is it taking so long to execute? At first it wasn't like this.
    Last edited by Excel_vba; 12-22-2013 at 10:29 PM. Reason: added code tags

  2. #2
    Valued Forum Contributor
    Join Date
    03-17-2007
    Location
    Michigan
    MS-Off Ver
    Excel 2016
    Posts
    951

    Re: Why is this block of code taking so long to process?

    As a work around to your problem, this code will just delete any rows that contain "ZZZ" in it; thus you wouldn't need to filter anything.
    Please Login or Register  to view this content.
    Just a thought.. Good luck!

  3. #3
    Forum Contributor
    Join Date
    12-15-2009
    Location
    Herndon, VA
    MS-Off Ver
    Excel 2010
    Posts
    163

    Re: Why is this block of code taking so long to process?

    Quote Originally Posted by lilsnoop View Post
    As a work around to your problem, this code will just delete any rows that contain "ZZZ" in it; thus you wouldn't need to filter anything.
    Please Login or Register  to view this content.
    Just a thought.. Good luck!
    Nice. Thank you for your suggestion.

  4. #4
    Valued Forum Contributor
    Join Date
    03-17-2007
    Location
    Michigan
    MS-Off Ver
    Excel 2016
    Posts
    951

    Re: Why is this block of code taking so long to process?

    No problem! Hope it helps!

  5. #5
    Valued Forum Contributor fredlo2010's Avatar
    Join Date
    07-04-2012
    Location
    Miami, United States
    MS-Off Ver
    Excel 365
    Posts
    762

    Re: Why is this block of code taking so long to process?

    Hi try this code and see if it helps.

    Please Login or Register  to view this content.
    Thanks

  6. #6
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: Why is this block of code taking so long to process?

    Quote Originally Posted by Excel_vba View Post
    When I set this up, it worked quickly like it should. Now all of a sudden it is taking for ever. A few lines above I added some With statements. I noticed the problem after that. so there is code before and after the code below in my procedure.
    ...
    When I take out this code in it's own procedure, it executes right away. Why is it taking so long to execute? At first it wasn't like this.
    Why do you not post the rest of the code when you say that it is the cause?
    • Please remember to mark threads Solved with Thread Tools link at top of page.
    • Please use code tags when posting code: [code]Place your code here[/code]
    • Please read Forum Rules

+ 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. taking too long to load2
    By muhdass in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-19-2013, 05:22 AM
  2. taking too long to load
    By muhdass in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-18-2013, 11:54 PM
  3. efficiency recomendations, code taking long time to execute...
    By am_hawk in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-04-2013, 03:55 PM
  4. Is there anyway to see why ScreenUpdating is taking so long?
    By foxguy in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-11-2011, 04:17 AM
  5. Simplify Long Process Function
    By imav in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-13-2011, 02:05 PM

Tags for this Thread

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