View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Mat P:son[_2_] Mat P:son[_2_] is offline
external usenet poster
 
Posts: 97
Default VBA Library References - deployment issue

"Club Internet" wrote:

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")

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

Application.VBE.ActiveVBProject.References.AddFrom File
Application.UserLibraryPath\mydll.dll

but it does not work


No

"Mat P:son" wrote in message
...
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

" wrote:

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