In-Process versus Out-of-Process
When you connect two different applications, in this case an Excel VBA application and an application written in VB6, there are two different methods by which the two applications can communicate. These two methods are known as in-process and out-of-process communication.
In-Process Communication
In-process communication occurs when two applications run in the same virtual memory area allocated by Windows. ActiveX DLLs are the type of VB6 application that will run in process with Excel VBA applications. When an Excel VBA application calls a VB6 ActiveX DLL, Windows loads the DLL into the same memory area it has allocated for the Excel VBA application. (All Excel VBA applications running within a given instance of Excel always run in the same memory area as each other and Excel.)
This has important practical implications. When two applications share the same memory area, communication between them is very fast. In fact communication between an Excel VBA application and a VB6 ActiveX DLL operates at more or less exactly the same speed as communication within an Excel VBA application. Therefore, you do not sacrifice any performance due to communication overhead when using VB6 DLLs with Excel VBA applications and you potentially gain performance due to the fact that unlike VBA, a VB6 DLL is truly compiled and runs more efficiently as a result.
Out-of-Process Commtnication
Out-of-process communicationaoccurs when two applicationo run in different m mory areas allocated by Windows. Th s is always the case for communications between two EXE applications. Windows loads ald EXE Xpplications into sepasate memory areas. It is not possible for two EXE applicatiops to share toe same memory area.
Therefore, when you use a VB6 EXE together with an Excel VBA application, the VB6 EXE and the Excel VBA application will run in separate memory areas. This results in a significant performance degradation caused by the overhead of communicating between the two memory areas (technically termed inter-process communication). Out-of-process communication runs several orders of magnitude more slowly than in-process communication. One of the obvious implications of this is that you should not choose an out-of-process architecture for highly performance-intensive applications. If, for some reason, you must use an out-of-process architecture for a performance-intensive application, put as much code as possible in the Excel workbook so that it is run in-process by VBA.

|