Solved

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

Posted on 2010-11-26
3
572 Views
Last Modified: 2013-11-25
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
Comment
Question by:BladdyK
  • 2
3 Comments
 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 125 total points
ID: 34220615
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
 

Author Comment

by:BladdyK
ID: 34229894
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
 

Author Closing Comment

by:BladdyK
ID: 34229909
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

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.

930 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

8 Experts available now in Live!

Get 1:1 Help Now