Declare Function issue with Vista

G

Greg Lovern

I distribute a standard DLL with my Excel Add-In, install it to
<windir>\System32, and reference it from the Add-In with Declare
Function. That works fine with Windows XP, but on Vista, if the user
doesn't right-click the setup file and choose Run As Administrator,
the DLL doesn't get copied.

I could copy it to the Add-In's folder instead, and then there would
be no problem copying the DLL to that folder, but since the user can
customize the install folder during setup, I can't hardcode the folder
in the Declare Function statement.

I could add the user's chosen install path to the system path, but if
my own is any indication, that isn't done much anymore, and I'm not
sure that it's a good idea.

Any suggestions on best practices for calling a custom standard DLL
from a Declare Function statement in Excel VBA?


Thanks,

Greg
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top