I
Ian
I'm trying to remove a reference which is marked as Missing on any machine
except my laptop (where the workbook was created).
Using the code below, I can identify all the correct references, but not the
problem one, so I can't remove it.
Set VBProj = Workbooks("II Checklist.xlt").VBProject
On Error Resume Next
For Each chkRef In VBProj.References
Debug.Print chkRef.Name
If chkRef.Name = "RefEdit" Then
VBProj.References.Remove chkRef
End If
Next
On my laptop the Debug.Print line produces the following in the Immediate
window:
Excel
stdole
Office
MSForms
RefEdit
On another machine, the output misses out the last line (RefEdit). The
problem is that, as I can't call up the name of the reference, I can't
delete it.
Any ideas, anyone?
TIA
Ian
except my laptop (where the workbook was created).
Using the code below, I can identify all the correct references, but not the
problem one, so I can't remove it.
Set VBProj = Workbooks("II Checklist.xlt").VBProject
On Error Resume Next
For Each chkRef In VBProj.References
Debug.Print chkRef.Name
If chkRef.Name = "RefEdit" Then
VBProj.References.Remove chkRef
End If
Next
On my laptop the Debug.Print line produces the following in the Immediate
window:
Excel
stdole
Office
MSForms
RefEdit
On another machine, the output misses out the last line (RefEdit). The
problem is that, as I can't call up the name of the reference, I can't
delete it.
Any ideas, anyone?
TIA
Ian