dll

farshad

Well-known member
Joined
May 1, 2003
Messages
109
Location
London
Hi,
I would like to call a com component (i.e a dll which is created in .net) from another program i.e. an excel VBA.

How is it possible to create a dll in .net?
Thanks
 
A DLL which is created in .NET is not a COM component, it is a .NET component, and as such is not directly callable from VBA. You need to create a new Class Library project, give the class the ComClass attribute, specify GUIDs using the GUID Generator, and tell the compiler to mark the DLL for COM Interop. When all is said and done, you will have two files: a standard .NET DLL, and a TLB TypeLib that can be referenced by VB. You wont really have a COM component, just a wrapper to a .NET component which will still require the .NET framework.

The process takes a bit of time, and it is fully documented in a MSDN. Just search for COM components in your MSDN and you should find something about creating them.
 

Similar threads

J
Replies
0
Views
59
Jalil Sear [MCPD SharePoint]
J
E
Replies
0
Views
242
Eldeeb92
E
S
Replies
0
Views
57
sva0008
S
Back
Top