How do I make sure that one piece (line) of code finishes, before the next line of code is executed? I’ve used Application.Sleep(x) but the length of time it needs to sleep, will be dependant on the user’s particular system, so what works on my computer, might not on someone else’s.
Here is what I’m doing:
1) I delete a picture file
2) I rename a different picture file, same name as the one I deleted
3) I copy the new picture to the old picture’s folder
--I don’t want to use Application.Sleep(x) here --
4) I refresh a web object that displays the picture.
My problem is that I get a Web Object refresh, before the new picture is in place.

