Modulenamen / Funktionennamen ausgeben ?

In VBA kann ich z.B. alle Worksheets ausgeben:

For i = 1 To Worksheets().Count
Debug.Print Worksheets(i).Name
Next i

geht das auch mit Modulen Bzw. Fuktionen und Prozeduren usw…

Danke

In VBA kann ich z.B. alle Worksheets ausgeben:
geht das auch mit Modulen Bzw. Fuktionen und Prozeduren usw…

Hi Sam,
aus dem Internet:

Option Explicit
Sub MakroListe()
 Dim vbc As Object, iRow As Integer, iCol As Integer, iCounter As Integer, 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

Gruß
Reinhard

Super Danke
Stern ist da