+ Reply to Thread
Results 1 to 13 of 13

Do While Loop never stops

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    03-27-2015
    Location
    Hong Kong
    MS-Off Ver
    Excel 2010
    Posts
    147

    Re: Do While Loop never stops

    Thanks for your prompt reply.

    1. Your codes somehow was stuck in :
    Set wkbSource = Workbooks.Open(strPath & strExtension, UpdateLinks:=False)
    2. In any case, I find that your codes included :
      Application.EnableEvents = False
    so I just added this codes into my original macro, and the whole thing works again and the loop can stop after finishing opening each CAL files.

    but I don't know why this EnableEvents is so important without which the loop will never end, but repeat again and again after after going through all the CAL files

    Thanks anyway as at least I can sort out where the problem is.
    Last edited by alansidman; 06-30-2019 at 12:15 PM.

+ 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. [SOLVED] Creating loop that stops after certain string
    By letsExcelebrate in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-19-2017, 05:16 PM
  2. [SOLVED] Do While ....Loop Never Stops
    By jadown in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-17-2013, 09:29 AM
  3. VBA - Loop stops too soon
    By DavidBW in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-24-2013, 06:42 AM
  4. loop that stops when certain value is obtained
    By ukhan12 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-07-2013, 10:41 PM
  5. [SOLVED] A Loop does not loop throught. It stops after two cells.
    By AB33 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-14-2012, 01:14 PM
  6. Code Stops in a loop?
    By playtowinpb@msn.com in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-19-2011, 01:57 PM
  7. [SOLVED] Formula in loop stops working
    By Jim73 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-08-2005, 12:06 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