If I remember correctly VBA cannot directly call into a class library created by VB.Net (managed code dll). However, you can use VB.Net to create a dll that hosts a COM object. VBA would be able to instantiate that COM object and use its methods and properties.
Can I make a dot net dll in visual studio (using visual basic) and have Excel call its methods?
I would like to create a dll using visual basic dot net, and then call its methods/functions from Excel's VBA. That way, Excel can pass data to my dll, and obtain a vector of answers. Can this be done?
1 additional answer
Sort by: Most helpful
-
Emi Zhang-MSFT 24,986 Reputation points Microsoft Vendor
2020-09-15T08:21:11.203+00:00 Hi @Gideon Maven ,
Based on your description, I suggest you post this issue to Excel for Developer forum:
https://social.msdn.microsoft.com/Forums/en-US/home?forum=exceldev
The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.