How do I notify VBA code when a process ends so that I do not need to add a timer on the run command?

I am trying to run a macro from within a VBa (vb6) program which creates a batch file and then runs the macro… However as far as the code is concerned it always continues on through the thread immediately after launching the bat file.

I have tried shell commands etc. But none of them seem to wait for the browser to close. Any help would be appreciated.