Click the Help Topics button to return to the list of topics.
Using ActiveX Components
An ActiveX component (*.OCX) enables you to add a great amount of power and flexibility to your VBA macro. An ActiveX component is basically a special type of DLL (dynamic link library). Originally, ActiveX components were created to replace Visual Basic controls, however they have exceeded this purpose. Visual Basic for Applications (VBA) is an ActiveX container, meaning that you can include ActiveX components in your VBA macro.
The components which are located on the toolbar are part of the Microsoft 2.0 Object library. These components are meant for VBA programming. You can add additional components to your VBA project. However, some components may work and others may not. Not all ActiveX components are meant for the VBA environment. It is recommended that you became familiar with a individual component before you add it to your VBA macro.
If you are trying to add a new Active X control to your VBA Toolbox and are receiving errors stating that the control is not licensed or that the control just does not work properly, this is not a bug - here may be many reasons for these error messages:
* Many Windows applications write Active X controls for their own use and therefore are not supported or even expected to be used by other applications. Many of the controls that are included with Corel WordPerfect Office are of this nature and cannot be used with VBA.
*
* Some Active X controls installed to your system may have been included with other development applications such as Visual C++, Visual Basic, Delphi etc, and they may have license requirements that only allow them to run in their own development environment. Therefore, they will not work with VBA.
*
As a result, only those Active X controls available with Microsoft Forms 2.0 that are shipped as part of Microsoft Visual Basic for Applications 6.0 are supported in WordPerfect Office. Any others you have on your system may be used with VBA, but may not be actually intended for use in this manner, and therefore will not work. Even if they do work, you may not have rights to distribute them to your VBA Macro users.
if you are using custom controls, be very careful that the control you are using is meant to be used in VBA and that you have the proper licensing rights required for its use in your application.