For Each vbc In vbp.VBComponents
frmAddIn.List1.AddItem vbc.Name
Set vbcm = vbp.VBComponents(vbc.Name).CodeModule
For Each vbm In vbcm.Members
strLine = " " & vbm.Name
Select Case vbm.Type
Case vbext_mt_Method
strLine = " " & vbm.Name & ", method"
strLine = strLine & " (line " & vbcm.ProcBodyLine(vbm.Name, vbext_pk_Proc) & ")"
Case vbext_mt_Property
On Error GoTo PropertyErr:
' Property Get
lngLine = vbcm.ProcBodyLine(vbm.Name, vbext_pk_Get)
If lngLine > 0 Then
strLine = " " & vbm.Name & ", Property Get "
strLine = strLine & "(line " & lngLine & ")"
frmAddIn.List1.AddItem strLine
strLine = ""
End If
' Property Let
lngLine = vbcm.ProcBodyLine(vbm.Name, vbext_pk_Let)
If lngLine > 0 Then
strLine = " " & vbm.Name & ", Property Let "
strLine = strLine & "(line " & lngLine & ")"
frmAddIn.List1.AddItem strLine
strLine = ""
End If
' Property Set
lngLine = vbcm.ProcBodyLine(vbm.Name, vbext_pk_Set)
If lngLine > 0 Then
strLine = " " & vbm.Name & ", Property Set "
strLine = strLine & "(line " & lngLine & ")"
End If
On Error GoTo 0
Case vbext_mt_Variable
strLine = strLine & ", variable"
Case vbext_mt_Event
strLine = strLine & ", event"
Case vbext_mt_Enum
strLine = strLine & ", enumerated value"
Case vbext_mt_Const
strLine = strLine & ", constant"
Case vbext_mt_EventSink
strLine = strLine & ", event sink"
End Select
If strLine <> "" Then frmAddIn.List1.AddItem strLine
Next
Next
If frmAddIn.Visible = False Then frmAddIn.Show
Exit Sub
PropertyErr:
lngLine = 0
Resume Next