CreateObject
How do I use CreateObject in VB to instantiate a dll instead of doing it in the references. This should be simple, sorry I'm a c++ programmer.
For instance, I reference my Novar.dll in my references then use this code:
code:--------------------------------------------------------------------------------
Dim comSched As NOVAR2BCMLib.Novar
Set comSched = New NOVAR2BCMLib.Novar
--------------------------------------------------------------------------------
and everything works great. How can I accomplish the same thing without using a reference. I tried to to this:
code:--------------------------------------------------------------------------------
Dim comSched As Object
Set comSched = CreateObject("Novar2BCMLib.Novar"
--------------------------------------------------------------------------------
This does not work and complains
quote:
--------------------------------------------------------------------------------
Runtime error '429':
ActiveX component can't create object
--------------------------------------------------------------------------------
Also on a side note, NOVAR2BCM is a visual c++ COM/ATL component in case this is relevant.
How do I use CreateObject in VB to instantiate a dll instead of doing it in the references. This should be simple, sorry I'm a c++ programmer.
For instance, I reference my Novar.dll in my references then use this code:
code:--------------------------------------------------------------------------------
Dim comSched As NOVAR2BCMLib.Novar
Set comSched = New NOVAR2BCMLib.Novar
--------------------------------------------------------------------------------
and everything works great. How can I accomplish the same thing without using a reference. I tried to to this:
code:--------------------------------------------------------------------------------
Dim comSched As Object
Set comSched = CreateObject("Novar2BCMLib.Novar"
--------------------------------------------------------------------------------
This does not work and complains
quote:
--------------------------------------------------------------------------------
Runtime error '429':
ActiveX component can't create object
--------------------------------------------------------------------------------
Also on a side note, NOVAR2BCM is a visual c++ COM/ATL component in case this is relevant.