This programs stops and waits for a few seconds in the middle of the execution of the VBA code.
Sometimes it is useful to stop the coding for a few seconds due to processes that needs to be finalized that are not directly connected and in interaction with the VBA engine, thus will make the program crash if they are not finalized before executing the rest of the VBA program. For example if you have a program that you can execute through VBA macro but it is not fully integrated with excel thus you do not know when the other program has performed their processes. But you might know that the maximum time for finish is 10 seconds then you simply stop your VBA code for 10 seconds and then you can continue the code again!
An example file of the code is possible to download at the end of this web site, enjoy! Or just copy and paste the code directly from this page.
Download excel file! Stop_and_Wait_While_Executing_VBA_Code.xls