Can't remove problem reference

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
 
I

Ian

I've bitten the bullet on this one and emailed everyone with replacements
for the faulty workbook. I wish I could have figured out what the problem
was, though. I hate to have to give up!!

Ian
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top