excel vba wait until process complete

' VBA code here. We can see that sheet 1 has been renamed as Anand and we get the message to wait for five seconds. Now, run the code. VBA Wait is a built-in function to pause the code from executing for a specified time. Should we burninate the [variations] tag? This is the solution to the UI going stale while the worker code is off busy working. Feel free to ask us. The only thing that comes to mind is. Now is the function which will take the current time and we are adding 10 seconds to the current time through time value function so that the code can wait or pause for 10 seconds. Application.Wait (Now + TimeValue ("0:00:15")) Loop. To accomplish this, use the CreateProcess function instead of the Shell function to begin your shelled program. This article will show you how you can make your code wait until a process completes in Excel VBA.