Do you mean all the workbooks in a specific directory, or the open workbooks other than ActiveWorkbook and ThisWorkbook?
Here's your original code with the module names
'This lists all VB components in a 3 column list box
Private Sub UserForm_activate()
Dim N As Integer, MyList(100, 4) As Variant, i As Long, T As Integer
Dim VBC, sTmp As String, WB As Workbook
'//headings
MyList(0, 0) = "COMPONENT NAME"
MyList(0, 1) = "COMPONENT TYPE"
MyList(0, 2) = "BOOK NAME"
MyList(0, 3) = "PROCEDURES"
'//define list
N = 1
For Each VBC In ActiveWorkbook.VBProject.VBComponents
MyList(N, 0) = VBC.Name
T = VBC.Type
If T = 1 Then MyList(N, 1) = "Basic Module"
If T = 2 Then MyList(N, 1) = "Class Module"
If T = 3 Then MyList(N, 1) = "UserForm"
If T = 11 Then MyList(N, 1) = "ActiveX"
If T = 100 Then MyList(N, 1) = "Book/Sheet Class Module"
MyList(N, 2) = ActiveWorkbook.Name
With VBC.codemodule
i = .CountOfDeclarationLines + 1
sTmp = ""
Do Until i >= .CountOfLines
MyList(N, 3) = .ProcOfLine(i, vbext_pk_Proc)
i = i + .ProcCountLines(.ProcOfLine(i, vbext_pk_Proc), vbext_pk_Proc)
If i < .CountOfLines Then N = N + 1
Loop
End With
N = N + 1
Next
'//load list to listbox
ListBox1.List = MyList
End Sub
'This is optional - used if a 'hard copy' list of components is wanted
Private Sub CommandButton1_Click()
Dim N As Integer, i As Long, T As Integer
Dim VBC As VBComponent, sTmp As String, WB As Workbook
Application.ScreenUpdating = False
If ActiveWorkbook Is Nothing Then Workbooks.Add Else Sheets.Add After:=Sheets(Sheets.Count)
Range("A1") = "COMPONENT NAME"
Range("B1") = "COMPONENT TYPE"
Range("C1") = "BOOK NAME"
Range("D1") = "PROCEDURES"
N = 2
For Each VBC In ThisWorkbook.VBProject.VBComponents
Range("A" & N) = VBC.Name
T = VBC.Type
If T = 1 Then Range("B" & N) = "Basic Module"
If T = 2 Then Range("B" & N) = "Class Module"
If T = 3 Then Range("B" & N) = "UserForm"
If T = 11 Then Range("B" & N) = "ActiveX"
If T = 100 Then Range("B" & N) = "Book/Sheet Class Module"
Range("C" & N) = ThisWorkbook.Name
With VBC.codemodule
i = .CountOfDeclarationLines + 1
sTmp = ""
Do Until i >= .CountOfLines
Range("D" & N) = .ProcOfLine(i, vbext_pk_Proc)
i = i + .ProcCountLines(.ProcOfLine(i, vbext_pk_Proc), vbext_pk_Proc)
If i < .CountOfLines Then N = N + 1
Loop
End With
N = N + 1
Next
Columns.AutoFit
Application.ScreenUpdating = True
Unload Me
End Sub
Again, let me know about the workbooks and I can try and modify that for you