View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Amanda[_5_] Amanda[_5_] is offline
external usenet poster
 
Posts: 9
Default Programmaticallly fixing references

HI,
I have some workbooks that are using libraries.
My workbooks are in a sense miniture VBA applications, as
these libraries (references) are necessary for the
workbooks to operate correctly.
I have a procedure that checks the references and trys to
find any missing (or broken references). This has worked
out fine, except for when the library that is missing is
not available due to the version number. When this happens
I am not able to manipulate the library reference
programmatically because it gives me an error message that
the "Reference.Name" of the object failed. For example: I
am referencing Microsoft ActiveX Data Objects RecordSet
2.7. Microsoft has a few versions of this 2.1 and 2.5. All
three use the same exact dll name, but the reference name
that is stored in VBA is lost, produces an error, and then
of course I have many other issues. I will not be present
to install this on each machine that uses the workbook. So
I have to have a method that can remove the incorrect
libraries. Any suggestions?

Amanda