programmatically checking references

  • Thread starter Thread starter Mark
  • Start date Start date
M

Mark

In moving from one computer to another, we're finding problems with
unnecessary references being added to .mdb file, which fail to work on other
PCs. In this particular case, the "Microsoft Office XP Web Components"
reference is being added unnecessarily, but bombs on other pc's.

Two questions:

1. Is there a way to programmatically check references and/or remove them if
they exist?

2. At what point do these references get added that are not manually added
by a user aside from when a .mdb file is created?

Thanks in advance!

Mark
 
Provided the references are not broken, you can loop through the References
collection to enumerate them.

If they are broken, any code will fail unless you are extremely careful to
explicitly call references from the unbroken libraries only, e.g.:
SomeVariable = VBA.Left([MyString],4)

For more info on that, see michka's article:
How to guarantee that references will work in your applications
at:
http://www.trigeminal.com/usenet/usenet026.asp?1033
 
Back
Top