Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / VB.NET / March 2008

Tip: Looking for answers? Try searching our database.

.NET in VBA

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
NooS - 03 Mar 2008 13:56 GMT
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?
Armin Zingler - 03 Mar 2008 14:16 GMT
> 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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.