Hi ,
I am working on a project to upgrade vb6 dlls, which we use in our vba
project, to vb.net

So I made a sample vb6 activex dll, which has a function that
displays a message box.
Then I upgraded this dll to vb.net and did all the stuff that one
usually does to make a .net assembly visible to COM / vb6.

1) Made the .net dll com visible.
2) registered for COM interop
3) Signed with a strong name and built the project.

Now I tried to display the message box, using VBA.

dim abc as project1.class1
set abc = new project1.class1
abc.display

------it displayed the message box present in the dll.

But when i tried with createobject, an error message comes saying '
ActiveX component cannot create the object'

dim myobj as object
set myobj = createobject("project1.class1")
myobj.display

I tried my best and searched the net for some help but couldnt get
anything.

So could you tell me why this works with early binding(new) and not
with late binding(createobject).
I really need to use createobject in my project.
Any ideas??

Please help.

Re: upgraded vba dll to vb.net dll not working with createobject by givmemore001

givmemore001
Wed May 21 01:16:44 PDT 2008

check out this link , if anyone has same problem

http://www.codeproject.com/KB/vb/MusaExposingCOM.aspx#_top



On May 15, 4:40=A0pm, givmemore001 <iypearun...@gmail.com> wrote:
> Hi ,
> I am working on a project to upgrade vb6 dlls, which we use in our vba
> project, to vb.net
>
> So I made a sample vb6 activex =A0dll, which has a function that
> displays a message box.
> Then I upgraded this dll to vb.net and did all the stuff that one
> usually does to make a .net assembly visible to COM / vb6.
>
> 1) Made the .net dll com visible.
> 2) registered for COM interop
> 3) Signed with a strong name and built the project.
>
> Now =A0I tried to display the message box, using VBA.
>
> dim abc as project1.class1
> set abc =3D new project1.class1
> abc.display
>
> ------it displayed the message box present in the dll.
>
> But when i tried with createobject, an error message comes saying '
> ActiveX component cannot create the object'
>
> dim myobj as object
> set myobj =3D createobject("project1.class1")
> myobj.display
>
> I tried my best and searched the net for some help but couldnt get
> anything.
>
> So could you tell me why this works with early binding(new) and not
> with late binding(createobject).
> I really need to use createobject in my project.
> Any ideas??
>
> Please help.