VBA Library References - deployment issue

  • Thread starter christophe.leroquais
  • Start date
C

christophe.leroquais

Hi,

I have the followinf issue:
When I create a macro that uses dediczted Library references and that I
save it in a xla file then I have issues for deployment because the
library references still refer to the old directory I had on my
development PC.

How can I make sure (automatically) that the References point to the
libraries in the correct deployment directory ?

Thanks,
Chris
 
M

Mat P:son

Hi there again Christophe,

If the library references you use are pointing to DLL:s that have been
correctly deployed and then registered the references will point to the
DLL:s. Excel is fetching the information about the DLL locations from the
Windows Registry.

What problems do you get? What is not working correctly? Have you checked
the that the registry contains the correct information?

Cheers,
/MP
 
C

Club Internet

the problem is that my users do not have the rights on their PCs to register
the dll.

So I tried to force to 'register' and to point to the dll by using in the
macro code:

Application.VBE.ActiveVBProject.References.AddFromFile
Application.UserLibraryPath\mydll.dll

but it does not work
 
M

Mat P:son

Club Internet said:
the problem is that my users do not have the rights on their PCs to register
the dll.

OKay, that's obviously a problem. And if your users have not been granted
Administration privileges you can't do very much about that -- if that's the
rule at their company then that's teh way it's going to be. I would recommend
that you don't try to hack it... Hacks are unlikely to work properly anyways.

I really think you should try to do it the proper way, i.e., let your users'
Administrator install the application for them. (The Administrator may enable
normal users to install applications, but it's probably not very likely to
happen. But if you want to know more about this, google for e.g. "Elevated
Privileges")
 

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