Gruppe
VBE
Problem
Wie kann ich mir in XL8 alle Prozeduren und benutzerdefinierten Funktionen einer Arbeitsmappe in einem Tabellenblatt auflisten lassen?
ClassModule: Tabelle1
Private Sub Worksheet_Activate()
'Dies ist nur ein Platzhalter zu Demonstrationszwecken
End Sub
StandardModule: basMain
Sub MakroListe()
Dim vbc As Object
Dim iRow As Integer, iCol As Integer, iCounter As Integer
Dim sMacro As String
Cells.Clear
Rows(1).Font.Bold = True
For Each vbc In ThisWorkbook.VBProject.VBComponents
iRow = 1
iCol = iCol + 1
Cells(iRow, iCol).Value = vbc.Name
With vbc.CodeModule
For iCounter = 1 To .CountOfLines
If .ProcOfLine(iCounter, 0) > "" Then
sMacro = .ProcOfLine(iCounter, 0)
If sMacro <> Cells(iRow, iCol) Then
iRow = iRow + 1
Cells(iRow, iCol).Value = sMacro
End If
End If
Next iCounter
End With
Next vbc
Columns.AutoFit
End Sub
ClassModule: UserForm1
Private Sub UserForm_Click()
'Dies ist nur ein Platzhalter zu Demonstrationszwecken
End Sub