I am forced to use DOS to run dbase IV programs. ( It's a legacy thing). I am using the Shell function to open a DOS command window, and then executing the dbase program. I then want to wait for the DOS window to close before executing more VB code. I cannot seem to find a way to make VB wait until the DOS window closes before continuing its execution. I know by default that Shell is asynchronous but I can't find a way to override this default setting. I thought that the dos window would have the focus and I could make my VB code wait until focus was returned to it. But it seems that it doesnt recognize the DOS window as having the focus and it just keeps going. I am not using forms, I am executing all this directly from code and would like to keep it that way. Any help? Thanks.