Using while wend is a better method, but nothing shown here should cause your problem. Can you share all of your code? I had a similar issue by not exiting a subroutine properly, the program worked for a while then would eventually crash. It took me a while to pin point it.
Bookmarks