Re: Set library reference from VBA code
- From: "Douglas J. Steele" <NOSPAM_djsteele@xxxxxxxxxxxxxxxxx>
- Date: Mon, 20 Aug 2007 07:57:22 -0400
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
.
- References:
- Re: Set library reference from VBA code
- From: Douglas J. Steele
- Re: Set library reference from VBA code
- From: Donald Fisher
- Re: Set library reference from VBA code
- Prev by Date: Re: OutputTo command
- Next by Date: RE: Multi user database
- Previous by thread: Re: Set library reference from VBA code
- Next by thread: Re: MultiSelect Listbox Results but Show Unique Records
- Index(es):
Relevant Pages
|