E
EA
Does anyone know of a way of removing a MISSING reference through code?
The code below me moves are references a reference, but will not work if the
reference is MISSING
EA
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sub CorrectOutlookReferenceLibrary()
're-references to Outlook 9.0
Dim xObject As Object
On Error Resume Next
Set xObject = ThisWorkbook.VBProject.References.Item("Outlook")
ThisWorkbook.VBProject.References.Remove xObject
ThisWorkbook.VBProject.References.AddFromFile "c:\Program Files\Microsoft
Office\Office\msoutl9.olb"
End Sub
The code below me moves are references a reference, but will not work if the
reference is MISSING
EA
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sub CorrectOutlookReferenceLibrary()
're-references to Outlook 9.0
Dim xObject As Object
On Error Resume Next
Set xObject = ThisWorkbook.VBProject.References.Item("Outlook")
ThisWorkbook.VBProject.References.Remove xObject
ThisWorkbook.VBProject.References.AddFromFile "c:\Program Files\Microsoft
Office\Office\msoutl9.olb"
End Sub