Re: Set library reference from VBA code



Each reference has a GUID associated with it, as well as a Major and Minor
property. You can store those properties, and then use then to add the
reference. For example, I've got a project that's using the Microsoft
Internet Controls.

I can add that reference programmatically using either

References.AddFromFile "C:\Windows\System32\shdocvw.dll"

or

References.AddFromGUID "{EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}", 1, 1

However, based on questions you've posted to other newsgroups, I'd recommend
you use Late Binding, rather than worrying about trying to add or remove
references based on what's installed on the user's workstation.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"Donald Fisher" <dsfcom@xxxxxxx> wrote in message
news:OqNExhc4HHA.1992@xxxxxxxxxxxxxxxxxxxxxxx
I understand how to add via the AddFromFile method but how from th
AddFromGUID method?

Douglas J. Steele wrote:
The References collection has a Remove method, and two different Add
methods: AddFromFile and AddFromGUID.

You should probably check out what MichKa has to say in
http://www.trigeminal.com/usenet/usenet026.asp



.



Relevant Pages

  • Re: OWC10/11.PivotTable confusion ;-)
    ... OWC reference has to be added manualy. ... If will have a look at AddfromGuid ... >> regards, ...
    (microsoft.public.access.formscoding)
  • Re: Function name not found
    ... Make installation as intuitive as possible for the customer. ... Doug Steele, Microsoft Access MVP ... eliminate the need for the reference, ... I have this startup methodology that provides a little more ...
    (microsoft.public.access.modulesdaovba)
  • Re: Function name not found
    ... Make installation as intuitive as possible for the customer. ... Doug Steele, Microsoft Access MVP ... eliminate the need for the reference, ... I have this startup methodology that provides a little more ...
    (microsoft.public.access.modulesdaovba)
  • Re: Function name not found
    ... Make installation as intuitive as possible for the customer. ... Doug Steele, Microsoft Access MVP ... eliminate the need for the reference, ... I have this startup methodology that provides a little more ...
    (microsoft.public.access.modulesdaovba)
  • Re: Function name not found
    ... Doug Steele, Microsoft Access MVP ... eliminate the need for the reference, ... If you're distributing to customers who are running on a different ... I have this startup methodology that provides a little more ...
    (microsoft.public.access.modulesdaovba)