|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
本帖最后由 lss001 于 2020-2-8 23:22 编辑
Sub mjsyqqs()
Dim ct As Object, n$, k&, d&
[c:d] = "": [c1] = "工程名": [d1] = "过程名": x = 2
Set xx = GetObject(ThisWorkbook.Path &"\自定义.xlsm")
For Each ct In xx.VBProject.VBComponents
With ct.CodeModule
Cells(x, 3) = .Name
d = .CountOfDeclarationLines + 1
Do While d < .CountOfLines
n = .ProcOfLine(d, k)
If InStr(.Lines(.ProcStartLine(n, k), .ProcCountLines(n, k) - 1), "Private") = 0 Then
If n <> "" Then i = i + 1: Cells(i + x - 1, 4) = n
y = xx.FullName & "#" & ct.CodeModule.Name & "." & n
Sheet2.Hyperlinks.Add Cells(i + x - 1, 4), y
End If
d = .ProcStartLine(n, k) + .ProcCountLines(n, k) + 1
Loop
End With
If d <= 2 Then x = x + 1 Else x = x + i: i = 0
Next
End Sub
|
评分
-
1
查看全部评分
-
|