开发者

How to create a .NET library to be used by MS Access 2007's VBA?

开发者 https://www.devze.com 2023-01-17 21:57 出处:网络
I have used .NET 3.5 with C# to create functions to gather data from a product\'s web service. Now we have a need to be able to get 开发者_如何学JAVAat that data in a Microsoft Access 2007 application

I have used .NET 3.5 with C# to create functions to gather data from a product's web service. Now we have a need to be able to get 开发者_如何学JAVAat that data in a Microsoft Access 2007 application.

I am not particularly familiar with VSTO et al, and I don't want to have to fuss with anything on the MS Access side--I'll leave that to our VBA expert. But I would like to make a library that our Access developer could easily use from his VBA code.

Can you point me in the right direction?


Make your C# library ComVisible and you can access it via ActiveX. But be aware of the fun part: You have to register it on all machines you want to use this!


I believe the simplest way of accomplishing this is to make your assembly and classes available via COM. This might be a good starting point for you: http://msdn.microsoft.com/en-us/library/zsfww439%28v=VS.90%29.aspx

0

精彩评论

暂无评论...
验证码 换一张
取 消