When you choose Make from the File menu, your component will be registered automatically in the Windows Registry. You can switch your test application between the component project and the compiled component using the procedures in this topic.
The following procedures perform the switch for an in-process component (ActiveX DLL project or ActiveX control project).
To switch from an in-process component project to the compiled .dll or .ocx file
A warning message will appear: "The project is referenced from another project. Are you sure you want to remove it?" Click OK to remove the project.
Visual Basic automatically switches references to the compiled .ocx or .dll file.
To switch back to testing your in-process component project
Visual Basic automatically switches references back to the component project.
Remember that an out-of-process component must be tested using two instances of the development environment. The following procedures perform the switch for an out-of-process component (ActiveX Exe project).
To switch from an out-of-process component project to the compiled executable
Important If you neglect to make the executable, you’ll get the following error message when you attempt to run your test project: "Connection to type library or object library for remote process has been lost. Press OK for dialog to remove reference."
When the component project is not running, Visual Basic automatically switches registry entries to point to the compiled executable.
To switch back to testing your out-of-process component project
When the component project is running, Visual Basic automatically switches registry entries back to it.
You may also want to create an executable file from your test application, and run several instances of it to test your component with multiple client applications.
You can test your component from any application that can make Automation calls. For example, you can open a Microsoft Excel module, add a reference to your component by choosing References from the Project menu, and write procedures to create and use objects provided by your component.
Even if you do not expect your component to be used as an extension of end user software tools like Microsoft Excel and Microsoft Access, it’s a good idea to test it with such tools. The more programming tools your component works with, the more value it will have for your company or for your customers.
For More Information See "Testing and Debugging ActiveX Components" for a list of topics related to testing and debugging.