Quote Originally Posted by dglienna View Post
But, called enough times in a row is a guaranteed way to run out of memory.

An instance of Excel is created, and it's under program control to terminate it properly. That is the ONLY way to release the memory it's using.
Yes of course, but this is not the purpose of the end statement. There is a specific statement to terminate the external instance of the other program you have started in this case. In other cases there may be no direct method to shut down the other program. Shell to a dos program for example.

BTW one can always simply close excel manually at any point.

The point is that just because the End statement does not terminate external programs launched by your code does not mean that it should never be used. That's kinda like saying one should never use the unload function because it does not unload the entire app or not use the print function because it does not cause a word document to print on a different pc. Or you could say that one should never use the excel functions or word or access because they don't terminate when your application is closed.

The fact is the End does exactly what it should. It ends your program execution. It is up to the programmer to make sure that the program is ready to be ended at this point but the VB environment does handle many oversights by the programmer as well as many bad programming techniques to result in a clean exit in most cases. It was never intended to end other programs.