• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 608
  • Last Modified:

How Do I get my VB.NET DLL functions to show up in VBA Object Browser?

I recently coded a VB.NET class in Visual Studio 2010 which has a bunch of public functions in them.  I compiled the DLL and referenced it in Excel VBA.  I can see the class name in the object browser, and I can see a public structure I have in the DLL, but none of the functions in the class are visible in the object browser.

What's funny is that I can create an instance of the class and call the functions, but none of the functions show up in Intellisense.  How can I get those functions to show up in the object browser?  Is this an issue of late vs. early binding?
0
BladdyK
Asked:
BladdyK
  • 2
1 Solution
 
käµfm³d 👽Commented:
You have to decorate your class with the following attribute:

    [ClassInterface(ClassInterfaceType.None)]

as discussed on this thread:  http://www.experts-exchange.com/Software/Office_Productivity/Office_Suites/MS_Office/Excel/Q_26450356.html
0
 
BladdyKAuthor Commented:
That definitely helped.  The other missing component was to create an interface for my class.  When I did that, I could see all of the functions in the Object Browser.

Thanks!
0
 
BladdyKAuthor Commented:
The solution was half of what I needed.  It was necessary to decorate my class, but I also need to implement an Interface to show the various functions in the object browser.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now