Hi
Im using this piece of code to remove Missing references. But it shows error on this. The error is
"RunTime Error-'2147319779(8002801d)'
bject library not registered"
Tyhe error shows on "ThisWorkbook.VBProject.References.Remove theRef"
code
====
Dim theRef As Variant, i As Long
For i = ThisWorkbook.VBProject.References.Count To 1 Step -1
Set theRef = ThisWorkbook.VBProject.References.Item(i)
If theRef.isbroken = True Then
ThisWorkbook.VBProject.References.Remove theRef
End If
Next i
If Err <> 0 Then
Call MakeMessages("A missing reference has been encountered!You will need to remove the reference manually", "Reference Alert", vbCritical)
End If
Please help
Thanks in advance
Im using this piece of code to remove Missing references. But it shows error on this. The error is
"RunTime Error-'2147319779(8002801d)'
Tyhe error shows on "ThisWorkbook.VBProject.References.Remove theRef"
code
====
Dim theRef As Variant, i As Long
For i = ThisWorkbook.VBProject.References.Count To 1 Step -1
Set theRef = ThisWorkbook.VBProject.References.Item(i)
If theRef.isbroken = True Then
ThisWorkbook.VBProject.References.Remove theRef
End If
Next i
If Err <> 0 Then
Call MakeMessages("A missing reference has been encountered!You will need to remove the reference manually", "Reference Alert", vbCritical)
End If
Please help
Thanks in advance