I noticed that VBA is really only happy when I use absolute paths to my homebrewed DLLs, like:

Code:
Declare Function myFunction1 Lib "C:\extremely\long\abs\path\to\DLL\myDLL.dll" _
   (argList) As retType
Declare Function myFunction2 Lib "C:\extremely\long\abs\path\to\DLL\myDLL.dll" _
   (argList) As retType
Declare Function myFunction3 Lib "C:\extremely\long\abs\path\to\DLL\myDLL.dll" _
   (argList) As retType
To be honest, that's kind of a drag. Is there any way possible to use relative pathnames here? I'm really just after shortening the declare statement to make it more palatable. Even this would be an improvement:


Code:
Const myPath = "C:\extremely\long\abs\path\to\DLL"

Declare Function myFunction1 Lib myPath & "\myDLL.dll" (argList) As retType
Declare Function myFunction2 Lib myPath & "\myDLL.dll" (argList) As retType
Declare Function myFunction3 Lib myPath & "\myDLL.dll" (argList) As retType
Not to mention the fact that if I give someone my Excel document, they only need to change one line to get all the Declare statements to match their own filesystem structure instead of modifying a whole bunch of Declare statements. In this regard, a relative path name to the DLL would be fantastic....

Is there anything that can be done here to make the declarations a bit more user friendly?

Thanks!
Pete