PC Review


Reply
Thread Tools Rate Thread

Breaking a Reference Error

 
 
Cresta
Guest
Posts: n/a
 
      5th Aug 2008
Hello
The code below is use to find any broken references and remove them. I have
proven it finds any 'MISSING' references but cannot remove them. It gives
error -2147319779 "Object Library not recognised"

Dim theRef As Variant, i As Long
On Error GoTo errorhandler:
For i = Application.VBE.activeVBProject.References.Count To 1 Step -1
Set theRef = Application.VBE.activeVBProject.References.Item(i)
If theRef.IsBroken = True Then
Application.VBE.activeVBProject.References.Remove (theRef)
End If
Next i

Anyone got any ideas on this.
Thanks
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Caption cross reference with non breaking space GDCross Microsoft Word Document Management 2 7th Aug 2008 05:15 AM
Breaking Link to a Circular Reference with Macro cardan Microsoft Excel Programming 0 28th May 2008 06:01 PM
Breaking links leaving invalid reference #REF! in cell =?Utf-8?B?S2VubnkgQm95?= Microsoft Excel Misc 1 28th Oct 2007 04:11 PM
error bars when breaking the y-axis =?Utf-8?B?V2F6b29saQ==?= Microsoft Excel Charting 3 17th Dec 2004 07:03 PM
Breaking a reference via code Lance McGonigal Microsoft Access VBA Modules 2 29th Jul 2004 06:03 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:10 PM.