Hello,
I'm declaring a DLL file (one of my own creation) in VBA with an explicit directory reference thus:
Private Declare Function GetQuote Lib _
"C:\Documents and Settings\Pooka\Desktop\d3\StockMarket.dll" () As Long
Since this isn't a standard .dll, it is in the same directory as the .xls file that is calling it. My desire is to be able to send the .xls and .dll files together to a friend and have them work together in any directory without having to modify the VBA decleration. I tried the following in hopes it would just look in the same directory as the .xls file:
Private Declare Function GetQuote Lib _
"StockMarket.dll" () As Long
But it said it couldn't find the .dll file. Is there any way I can get around this so that it won't break the moment I move the files into another directory? (I have tried using CurDir, but the "working" directory which this function returns is not the same as the directory containing my .xls file.)
Regards,
Matt
Bookmarks