Prasoon Tiwari
Prasoon Tiwari

Reputation: 850

Calling VB.NET code from Excel

I open an Excel workbook from VB.Net and then want an event in the workbook (such as pressing a button) to activate code in VB.Net. How do I accomplish this type of callback?

Upvotes: 1

Views: 1015

Answers (1)

Hans Olsson
Hans Olsson

Reputation: 55009

Make the .Net assembly act as a COM object which is quite easy to use from VBA.

See this page for a comprehensive example:
http://richnewman.wordpress.com/2007/04/15/a-beginner%E2%80%99s-guide-to-calling-a-net-library-from-excel/

Upvotes: 1

Related Questions