I working with vb.net 2005. I created a Class Library project and add a COM
Class to the project. I set COM interoperability, and COM visibility of the
project.
Also I set a strong name of assembly.
I compile all in a dll file.
Now, if I refer it in Excel 2003 VBA macro I view method and properties
correctly, but if I run the macro, VBA say me that dll class not found.
Why?
> I working with vb.net 2005. I created a Class Library project and
> add a COM Class to the project. I set COM interoperability, and COM
[quoted text clipped - 4 lines]
> properties correctly, but if I run the macro, VBA say me that dll
> class not found. Why?
Try putting the dll in the excel.exe folder. Or in a sub folder, and add
an excel.exe.config file to the excel.exe folder. See docs for details.
Armin
NooS - 04 Mar 2008 10:31 GMT
Ok, I copy the dll file in Excel.exe directory and now VBA find my library,
but when I run the macro VBA now say me that "The format of file 'myDLL' is
not valid".
In the .NET project COM interoperability, and COM visibility are correctly
setting.
What is wrong?
> > I working with vb.net 2005. I created a Class Library project and
> > add a COM Class to the project. I set COM interoperability, and COM
[quoted text clipped - 9 lines]
>
> Armin
Armin Zingler - 04 Mar 2008 11:11 GMT
> Ok, I copy the dll file in Excel.exe directory and now VBA find my
> library, but when I run the macro VBA now say me that "The format of
[quoted text clipped - 3 lines]
> correctly setting.
> What is wrong?
All I say will be speculation... Do you run Vista 64? Which target did
you choose to compie the DLL?
Armin
NooS - 04 Mar 2008 15:02 GMT
No, I run it on Windows XP Professional SP2.
My pc have an Intel Core2 CPU, and I compile the DLL to AnyCPU target.
I hate compatibility problem... ;O)
Armin Zingler - 04 Mar 2008 17:22 GMT
> No, I run it on Windows XP Professional SP2.
> My pc have an Intel Core2 CPU, and I compile the DLL to AnyCPU
> target.
>
> I hate compatibility problem... ;O)
I currently have no clue. Anyone?
Family Tree Mike - 04 Mar 2008 17:41 GMT
> > No, I run it on Windows XP Professional SP2.
> > My pc have an Intel Core2 CPU, and I compile the DLL to AnyCPU
[quoted text clipped - 3 lines]
>
> I currently have no clue. Anyone?
Try again without using strong naming? It shouldn't be required for this to
work, but if you have a dependency on some dll that is not strong named, you
would have problems, perhaps...
NooS - 05 Mar 2008 07:18 GMT
I try to compile without the strong name.
Nothing change...
Armin Zingler - 05 Mar 2008 13:08 GMT
> I try to compile without the strong name. Nothing change...
Hmmm... Then I'd try the m.p.dotnet.framework.interop group.
Armin