How to compile a VBNET .dll and use it as reference in Excel?

Posted on 2006-04-01
Medium Priority
Last Modified: 2010-04-24
i am upgrading my VB6 application to VBNET.
I have Excel set up already with a reference to my VB6 dll and everything works fine.
when i finished correcting all the errors and warnings to upgrade my project to NET, i built it,  but now i can't find it in the Excel references. and when i browse to it i get an error "Cant reference the selected file".
please give me any guidance since im new to VBNET.
Question by:newyuppie
  • 3
LVL 13

Author Comment

ID: 16351332
i need guidance in why i need to regasm the dll when in VB6 it was registered automatically. i also want to know whats this about strong names and how does this affect excel interoperability.
any suggestions?? even a link that i can read.
LVL 96

Accepted Solution

Bob Learned earned 1000 total points
ID: 16354325
Here is an article that describes the steps to create a COM-capable .NET assembly:

Calling .NET From COM

LVL 13

Author Comment

ID: 16355460
thats an article for C, but basically describes the steps very lightly.

after i regasm my dll, and try to call it with excel, i get "automation error: file or assembly not found". i registered it globally too and no luck.
do i have to use CREATEOBJECT in excel necesarilly? i've been trying to create the object like DIM myobj as NEW assembly.class, like ive always done when i use to make VB6 dlls, but no luck i get the automation error.
any suggestions?>
LVL 13

Author Comment

ID: 16355550
i accepted because i kind of found this out on my own, but i appreciate Bob's help. the link was very general, and C# not VBNET. the grade C was because of the generality of the link
thanks anyway

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
Loops Section Overview
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question