Programmatically reference an ActiveX dll
I have been searching for the solution but without success.
Can I programatically make a reference to an ActiveX dll as an alternative to manually doing
Project > reference.
Windows Forum
I have been searching for the solution but without success.
Can I programatically make a reference to an ActiveX dll as an alternative to manually doing
Project > reference.
????
.net ?
by sankulpune
by slayer_
set oObj = CreateObject("Class.object")
Example
Dim oXML as Object
Set oXML = CreateObject("Microsoft.XMLDOM")
Creates a DOM object.
When you are done using the object, set its reference to nothing
Set oXML = Nothing
This will free up the memory
Also, watch yourself on objects. An created object is considered "empty". If you set an object to nothing, it is not empty, but it IS nothing.
Put simply, this code will runtime error if your object was not created.
If Not Is Nothing Then 'Check if object has not been created
So a trick I have learned when dealing with objects in VB6 and especially VBScript, is to actually set all your object variables to "nothing" before you even use them. That way they are always non "empty".
This discussion is closed to new replies.
Sort by Trending