0

Previously I saw from somewhere else (I can't revisit that source now as I was fired from the company) a piece of C# coding which create a dll. And that .dll can be called directly by Excel VBA's Reference. (Not by calling reference from .tlb)

I tried to replicate it but fails, warning me that "Can't add a reference to the specified file" when I tried to add the .dll reference. But its OK to add the .tlb reference.

Is there anyway to add the .dll reference instead of .tlb?

4

1 回答 1

0

通常在 VBA 代码中将库称为特定的函数或命令(无效函数)。

http://msdn.microsoft.com/en-us/library/office/bb687915.aspx

您还可以使用适用于 Office 的 Visual Studio 工具,它为您提供比 dll 引用和 VBA 更强大的功能。

此外,您可以通过执行以下操作来制作没有 VSTO 的加载项:http: //msdn.microsoft.com/en-us/library/ms173189 (VS.80).aspx

于 2013-04-07T18:53:04.407 回答