Sub Test_VBComponent_Collection() Dim B As Workbook Set B = ThisWorkbook 'Iterate over the VBProjects available in the VBA (VB editor) 'There is probable only one! VBProjects(0) For Each proj In B.Application.VBE.VBProjects MsgBox proj.Name MsgBox proj.VBComponents.Count For Each comp In proj.vbcomponents 'Check Properties etc comp.Add (vbext_ct_ClassModule) Next Next End Sub