Private Sub ListBox3_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
Dim Mdl As Object
Dim i As Integer, Y As Integer
Dim X As Byte
Dim Cible As String
Dim tablo()
Dim t As String
For i = 0 To ListBox3.ListCount - 1
If ListBox3.Selected(i) = True Then t = ListBox3.List(i, 0)
Next i
If t = "" Then Exit Sub
For i = 1 To ActiveWorkbook.VBProject.VBComponents.Count
Set Mdl = ActiveWorkbook.VBProject.VBComponents(i).CodeModule
With Mdl
For Y = 1 To .CountOfLines
Cible = ActiveWorkbook.VBProject.VBComponents(Mdl).CodeModule.Lines(Y, 1)
Cible = Application.Substitute(Cible, " ", "")
If Len(Application.Substitute(Cible, "Sub", "")) < Len(Cible) Then
If Left(Cible, 3) = "Sub" Or Left(Cible, 7) = "Private" Then
X = X + 1
ReDim Preserve tablo(1 To 2, 1 To X)
tablo(1, X) = ActiveWorkbook.VBProject.VBComponents(Mdl).CodeModule.Lines(Y, 1)
tablo(2, X) = i
End If
End If
Next
End With
Next
For i = 1 To UBound(tablo, 2)
If tablo(1, i) = t Then
Application.VBE.ActiveVBProject.VBComponents(tablo(2, i)).CodeModule.CodePane.Show
End If
Next i
End Sub