Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 76
Default Breaking a Reference Error

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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Breaking Link to a Circular Reference with Macro cardan Excel Programming 0 May 28th 08 06:01 PM
Breaking links leaving invalid reference #REF! in cell Kenny Boy Excel Discussion (Misc queries) 1 October 28th 07 04:11 PM
error bars when breaking the y-axis Wazooli Charts and Charting in Excel 3 December 17th 04 07:03 PM
Reference Error RB Smissaert Excel Programming 0 July 30th 04 10:28 PM
VBA reference error Thor[_2_] Excel Programming 1 January 7th 04 09:46 PM


All times are GMT +1. The time now is 06:51 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"