|
发表于 2024-8-31 10:19
来自手机
|
显示全部楼层
sunny_8848 发表于 2024-8-31 07:42
谢谢大家的回复。因为打开引用面板后,因为面板大小不能调整导致有些DLL的路径和名称看不清楚,所以想请教 ...
Sub ThisWorkbookReferences()
On Error Resume Next
'以下自动添加引用Extensibility5.3
Set myr = ThisWorkbook.VBProject.References.AddFromGuid _
("{0002E157-0000-0000-C000-000000000046}", 5, 3)
Call 遍历所有的前期引用
On Error GoTo 0
End Sub
Sub 遍历所有的前期引用()
Dim re As Reference
ar = Array("引用名称", "引用路径","GUID", "Major", "Minor")
Cells(1, 1).Resize(1, 5) = ar
i = 2
For Each re In ThisWorkbook.VBProject.References
With re
Cells(i, 1) = .Name '名称
Cells(i, 2) = .FullPath '路径
Cells(i, 3) = .GUID '全局唯一标识符
Cells(i, 4) = .Major '类型库主版本号
Cells(i, 5) = .Minor '类型库次版本号
'Cells(i, 6) = .Description '说明
i = i + 1
End With
Next
End Sub
|
评分
-
1
查看全部评分
-
|