|
- Sub Delete_Broken_Reference()
- 'Here we assume that a reference is made to the Microsoft Visual Basic for Applications Extensibility 5.3 library
- Dim VBReferens As VBIDE.Reference
- Dim VBProjekt As VBIDE.VBProject
- Dim stBook As String
- stBook = Workbooks("Test.xls").Name
- Set VBProjekt = Workbooks(stBok).VBProject
- For Each VBReferens In VBProjekt.References
- If VBReferens.IsBroken Then VBProjekt.References.Remove VBReferens
- Next VBReferens
- End Sub
复制代码 这段代码一运行就会出现“用户定义类型未定义”的提示,查了下,发现应该是VBE的引用中没有引用VBIDE,但我找不到这个引用啊?请高手指点!非常感谢!
|
|