Hi guys,
My problem is more like a VB problem, than a VBA problem.
I have a DLL that is to be used by the macros in excel. Uptill now i was happy by declaring the functions of the DLL as:
Private Declare function PrintName lib "c:\my_dll.dll" (byval name as string) as boolean
Now the problem is that the path of this DLL would be known at runtime. I can no longer use hardcoded paths.
Can anybody help with, how to load the DLL in VBA at runtime?
I tried adding the path of the DLL to the "PATH" environment variable. The SetEnvironmentVariableA (in kernel32.dll) returns TRUE, but if i try to read the variable again (using Environ), i don't find my modifications.
Please help.
Bookmarks