R
Ron Dahl
I am using the following code to delete broken references:
Dim myRef As Object
For Each myRef In ThisWorkbook.VBProject.References
If myRef.IsBroken Then ThisWorkbook.VBProject.References.Remove myRef
Next myRef
I do have a reference set to Microsoft Visual Basic for Applications
Extensibility 5.3, but whenever it gets to a broken reference, I still get
an error message and the reference is not deleted.
The error number is -2147319779 and the err.description was that the Object
Library was not registered.
A little more background is that the the broken reference was set to
Microsoft ActiveX Data Objects 2.7 Library by other users. When a user does
not have Version 2.7, I wanted this reference to be deleted and Version 2.5
(which all of our users seem to have) to be added.
Thanks in advance for any help.
Ron Dahl
Dim myRef As Object
For Each myRef In ThisWorkbook.VBProject.References
If myRef.IsBroken Then ThisWorkbook.VBProject.References.Remove myRef
Next myRef
I do have a reference set to Microsoft Visual Basic for Applications
Extensibility 5.3, but whenever it gets to a broken reference, I still get
an error message and the reference is not deleted.
The error number is -2147319779 and the err.description was that the Object
Library was not registered.
A little more background is that the the broken reference was set to
Microsoft ActiveX Data Objects 2.7 Library by other users. When a user does
not have Version 2.7, I wanted this reference to be deleted and Version 2.5
(which all of our users seem to have) to be added.
Thanks in advance for any help.
Ron Dahl