S
Stewart Berman
We need to use an ActiveX control housed in an OCX file within a VBA module.
We are currently doing that by using late binding and
CreateObject("ControlName.ObjectName"). Unfortunately, we now need to be
able to be sure that we are using a specific file from within our
application folder without relying on the registry to find it.
It has been suggested that we could use LoadLibrary to bring in the OCX. If
anyone can point to any sample VBA code that does this it would be greatly
appreciated -- especially if we did not have to define each entry point and
property in our code. The ideal solution would be if we could load the OCX
into memory, create the object we need using it and then use the rest of our
existing code.
We are currently doing that by using late binding and
CreateObject("ControlName.ObjectName"). Unfortunately, we now need to be
able to be sure that we are using a specific file from within our
application folder without relying on the registry to find it.
It has been suggested that we could use LoadLibrary to bring in the OCX. If
anyone can point to any sample VBA code that does this it would be greatly
appreciated -- especially if we did not have to define each entry point and
property in our code. The ideal solution would be if we could load the OCX
into memory, create the object we need using it and then use the rest of our
existing code.