programmatically checking references

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
 
A

Allen Browne

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
 

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