+ Reply to Thread
Results 1 to 2 of 2

Macro Hangs until Interrupted Excel 2016

  1. #1
    Registered User
    Join Date
    08-03-2012
    Location
    Calgary
    MS-Off Ver
    Excel 2010
    Posts
    9

    Macro Hangs until Interrupted Excel 2016

    Hello everybody, I am having a problem and can't seem to chase it down. I have a macro that builds out a range on another worksheet for a larger overall procedure. If I run this macro out of the VBA window it runs in less than a full second but when I run the main routine this sub runs much much longer. However, if I click anywhere in excel during the longer run time, I get the "not responding" fade for excel, and then immediately the sub pushes through and completes.

    I do expect a slightly longer run time as there is more being done when it's called in the routine as opposed to alone, but I cannot understand why just this one sub causes the hang up and why trying to interrupt fixes it. This was built in Excel 2010 and did not experience that issue, however since we have switched to 2016 this has began along with other overall performance issues.

    Any suggestions or ideas are much appreciated.

    Thanks

    Please Login or Register  to view this content.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Macro Hangs until Interrupted Excel 2016

    Hello GhostCookie,

    In your For ... Next loop, add a DoEvents statement immediately after the For. You can then interrupt the loop using the keys Ctrl+Break to examine your values. To restart the loop Press F5.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

+ 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. Excel 2016 file hangs on open
    By jonathanwsmith in forum Excel General
    Replies: 4
    Last Post: 04-23-2018, 12:52 PM
  2. Replies: 1
    Last Post: 09-18-2017, 08:27 AM
  3. [SOLVED] Excel Hangs when running Macro unless resource monitor open on top of excel??????
    By JimBobBowie in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-16-2014, 10:55 AM
  4. Excel hangs when trying to use addfromstring function to write a macro
    By gows1982 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-24-2014, 03:29 AM
  5. Excel Hangs When Attempting To Close A Workbook Via A Macro
    By BinaryOrc in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-09-2013, 11:50 AM
  6. Macro hangs or makes excel not respond
    By Philb1 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 10-25-2011, 05:45 AM
  7. [SOLVED] Macro hangs my excel (not responding)
    By Jeff in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-08-2005, 08:05 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