Calling a .Net public sub from an Excel Macro

S

Scott Eguires

This may not be the right place to post this but I cant
find a .Net section for Office:

How do I call a public procedure in a codebehind .net dll
from an excel macro?

Thanks

Scott Eguires
 
W

Wei-Dong Xu [MSFT]

Hi Scott,

Thank you for posting in MSDN managed newsgroup!

This issue is related to the com and .Net interop. Since VBA code is based on com, you should use tlbexp utility to export the .net managed assembly
into one type library and then reference this type library in VBA editor so that you can use the component in VBA. For more information, I'd suggest
one MSDN article may provide more assistance for you on this issue. Please go to:
Calling a .NET Component from a COM Component
http://msdn.microsoft.com/vstudio/u.../library/en-us/dndotnet/html/callnetfrcom.asp

Type Library Exporter (Tlbexp.exe)
http://msdn.microsoft.com/library/d...ls/html/cpgrftypelibraryexportertlbexpexe.asp

Please feel free to let me know if you have any further questions.

Does this answer your question? Thank you for using Microsoft NewsGroup!

Wei-Dong Xu
Microsoft Product Support Services
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top