Reduce your code to just half a dozen lines that show the problem when run, then show us that.
In reply to Re: Routine stopped working by GrandFather in thread Routine stopped working by oldcity