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. Basically an ActiveX component is a special type of DLL (dynamic link library). Originally ActiveX components where created to replace Visual Basic controls, however they have exceeded this purpose. Visual Basic for Applications 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.
Active X controls cover a wide range of applications and uses such as those listed below:
* Many Windows applications write Active X controls for their own use and therefore are not supported or even expected to be used by others. Many of the controls that are included with Corel WordPerfect Office 2002 are of this nature and cannot be used with Visual Basic for Applications.
*
* 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 Visual Basic for Applications.
*
So in short, 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. Any others you have on your system may be used with Visual Basic for Applications, but may not be actually intended to be used with Visual Basic for Applications, and therefore will not work. Also even if they do work you may not have rights to distribute them to your VBA Macro users. So in general if you are using custom controls be very careful that the control you are using is meant to be using in VBA and that you have the proper licensing rights to use it.