Yes, I think this would work...

But the Application.DoEvents(); will just cause problems... Assuming this algorithm is called from a button-click, it (DoEvents) will enable the user to click the button a second time, thus entering the same method while the previous instance is still running…