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 / .NET Framework / Interop / April 2006

Tip: Looking for answers? Try searching our database.

Instantiating a .Net class in MS Excel Macro

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Shilpa - 11 Apr 2006 10:18 GMT
Hi,

I am trying to instantiate a .Net class in the VB editor of MS Excel
(PE 2003) Macros.
I have added the reference to the tlb of the .Net (TestProject)
project.
I am able to create the object as
dim x as TestProject.TestClass
But the following line of code is causing a runtime error.
set x = new TestProject.TestClass

I am getting the following error
"Automation error
The system cannot find the file specified."

Please help.

Regards,
Shilpa
Bob Eaton - 15 Apr 2006 04:23 GMT
You added a reference to the TLB file in Excel, but where is the DLL? The
same folder as the TLB?

It's probably having trouble finding it... I do this with a .Net assembly
that is both in the folder where the .tlb file is located (which also
happens to be in the path, though I don't think that helps with .net
assemblies) as well as in the global assembly cache and it works fine.

Bob

> Hi,
>
[quoted text clipped - 15 lines]
> Regards,
> Shilpa

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.