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

Posted on 2006-04-01
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
    LVL 13

    Author Comment

    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

    Here is an article that describes the steps to create a COM-capable .NET assembly:

    Calling .NET From COM

    LVL 13

    Author Comment

    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

    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

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Join & Write a Comment

    A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
    Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    729 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

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now