A Simple C# DLL - how do I call it from Excel, Access, VBA, VB6 ?
Posted
by
divinci
on Stack Overflow
See other posts from Stack Overflow
or by divinci
Published on 2009-07-23T10:08:12Z
Indexed on
2010/12/23
13:54 UTC
Read the original article
Hit count: 204
Hi all,
I have a simple class library written in c#.
using System;
namespace TestDll
{
public class Test
{
public string HelloWorld
{
get
{
return "Hello World";
}
}
}
}
My question is how can I call this HelloWorld function from Microsoft Office Visual Basic (which I think is VB6)?
My first step was to add the DLL as a reference - but on browsing and selecting the compiled DLL the message "Can't add a reference to the specified file." was thrown.
Can anyone point me in the right direction as to why/how to get this working?
Thanks in advance SO!
© Stack Overflow or respective owner