View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jul Jul is offline
external usenet poster
 
Posts: 7
Default Using dll with a dynamic link in VB

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