How can MS Access reference a .net dll

M

moondaddy

I'm using MS Access 2003 and want to use a dll writen in vb.net. How can I
do this?
 
M

Mingqing Cheng [MSFT]

Hi moondaddy,

From your descriptions, I understood you would like to call a custom DLL
from Access VBE. Have I understood you? If there is anything I
misunderstood, please feel free to let me know.

Based on my scope, if you would like to call an Unmanaged DLL, see the
document and sample below

Using C++ DLL's in VB
http://www.mvps.org/EDais/Tutorials/CDLL/index.html

If you would like to call an Managed DLL, see the site http://pinvoke.net/,
which attempts to address the difficulty of calling Win32 or other
unmanaged APIs in managed code (languages such as C# and VB .NET).

Thank you for your patience and cooperation. If you have any questions or
concerns, don't hesitate to let me know. We are here to be of assistance!


Sincerely yours,

Mingqing Cheng
Microsoft Developer Community Support
 
B

Brendan Reynolds

To the best of my knowledge, you can't. A possible workaround is to create a
web service that returns the result of the .NET function as XML, then add
VBA code to the Access app to parse the XML. It's not pretty, but I've done
it, and it can work.

--
Brendan Reynolds (MVP)
http://brenreyn.blogspot.com

The spammers and script-kiddies have succeeded in making it impossible for
me to use a real e-mail address in public newsgroups. E-mail replies to
this post will be deleted without being read. Any e-mail claiming to be
from brenreyn at indigo dot ie that is not digitally signed by me with a
GlobalSign digital certificate is a forgery and should be deleted without
being read. Follow-up questions should in general be posted to the
newsgroup, but if you have a good reason to send me e-mail, you'll find
a useable e-mail address at the URL above.
 
M

Mingqing Cheng [MSFT]

Hi Moondaddy,

Thanks the greatest input of MVP Brendan, I wanted to post a quick note to
see if you would like additional assistance or information regarding this
particular issue. We appreciate your patience and look forward to hearing
from you!

Thank you for your patience and cooperation. If you have any questions or
concerns, don't hesitate to let me know. We are here to be of assistance!


Sincerely yours,

Mingqing Cheng
Microsoft Developer Community Support
 

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