About Quitting the Other Application (VBA/ActiveX)

When you start an application programmatically it takes up memory in the computer. You should quit the application when you have finished using it so system resources can be freed up.

Although each Object Model is different, most have a Quit method from the Application object that can be used to close the application cleanly. For example, using the variable declarations from the previous section, the following line of code will quit Excel:

ExcelAppObj.Application.Quit
Note: Destroying or going beyond the scope of the object variable does not necessarily cause the application to terminate. You should always quit the application using the appropriate method to assure proper memory cleanup.