Thank you, guys! I got it
Cheers,
Charles
Actually Charles, you do not have a fully qualified ProgID in your call to CreateObject. It works when using "As New" syntax because VB has already loaded the library and knows where to find MYOBJ (asuming there is no conflict). Use the full ProgID which is:
Set MyObj = CreateObject("<ProjectName>.<ClassName>")
= )
------------------------------------------------------------------------------
Monte Hansen
VB Yuk Yuk
http://KillerVb.com
Hi,
I developed a simple dll and registered in my system. I add in the reference
of the dll in my new VB application. I have no problem in creating instance
of the object using New operator. However, I run into error saying unable to
create ActiveX when I try to use CreateObject.
set myobj = new MYOBJ 'OK
set myobj = CreateObject("MYOBJ") 'Error
Any suggestion?
Charles