First of all this only happens with this code if the code is being run from the windows task scheduler - I am not sure what that has to do with it, but it might be relevant. Here is a related post: https://www.excelforum.com/excel-pro...scheduler.html. I can run this code in real time and it runs without error to completion.
In the code below, there are two DoEvents with the comment "Added just because." These lines of code are highlighted in green. According to the log, when these lines are included the code stops on
If I remove these two lines, the code stops onPlease Login or Register to view this content.
Which is exactly two non-comment instructions later.Please Login or Register to view this content.
In other words, the code appears to execute a fixed number of steps and then stops. No error message. Excel is still running, but using no CPU.
Just for grins, I set and unset break points. To see if "toggling" breakpoints would clear the issue. Nope!
I am wondering if anybody has an idea as to why this is happening and why only if launched from the task scheduler. I have other tasks that run successfully from the task scheduler.
Please Login or Register to view this content.
Bookmarks