Using dll with a dynamic link in VB

J

jul

I have a function in a dll (built in C) that is called through Excel VBA.

Currently I declare my function in VB as follows:
Declare Function MyFunction Lib "C:\MyDll.dll" (ByVal ...) as Integer

Yet, I would like the user to be able to specify the adress of the dll in
excel (via a message box or a cell).

How can I change the link "C:\MyDll.dll" in a dynamic way in VBA.

Many thanks in advance

Julien
 

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