A "normal" declare statement for a DLL function looks something like this:
Declare Sub subName Lib "path_to_lib" _ Alias "aliasName" _ (...) In my application, it would be nice to have the user select their library location, after which I write that location to a cell. I'd like to pass this value to the "path_to_lib" argument, but I'm having difficulty extracting the cell value.
I tried assigning the cell value to a global variable, say pathVariable and writing:
Declare Sub subName Lib " & pathVariable & " _ Alias "aliasName" _ (...) But that returns the error: File Not Found: & pathVariable &
I also tried double quotes, which returned the error: File Not Found " & pathVariable & "
I then tried triple quotes, which VBA helpfully reduced to double quotes giving me the same error.
Is there some special syntactical sauce here; or even an alternative method? Or should I abandon this (helpful) feature?
