Public Function strReport() As String
Dim refLoop As Reference
' 测试是否有损坏的引用
If Application.BrokenReference = True Then
strReport = "The following references are broken:" & vbCr
' 循环检查每个引用
For Each refLoop In Application.References
If refLoop.IsBroken = True Then
strReport = strReport & " " & refLoop.Name & vbCr
End If
Next refLoop
End If
End Function