Public Ajout
Sub ArecupMAcroTitresClasseur()
For i = 1 To 1000
Ajout = ActiveCell.Row
NF = ActiveCell.Offset(0, -1) & "\" & ActiveCell
'MsgBox NF
'Application.EnableEvents = False
ActiveWorkbook.FollowHyperlink Address:=NF ', _
NewWindow:=True
listeMacrosTitre_colonneCeClasseur
ActiveWorkbook.Close False
'Application.EnableEvents = True
' Stop
ActiveCell.Offset(1, 0).Select
Ajout = ActiveCell.Row
Next
End Sub
Sub listeMacrosTitre_colonneCeClasseur()
'Addref
Dim i As Integer ', Ajout As Integer
Dim nomaraj As String
Dim Msg As String
Dim VBCmp As VBComponent
Dim X As Integer
colonne = 10
'Sheets.Add
'Ajout = Workbooks(ThisWorkbook.Name).ActiveCell.Row
'GoTo suite
'For Each VBCmp In ThisWorkbook.VBProject.VBComponents
On Error Resume Next
For Each VBCmp In ActiveWorkbook.VBProject.VBComponents
Msg = VBCmp.Name
'With Cells(Ajout, 1)
'.Interior.ColorIndex = 6
'.Value = Msg
'End With
'Stop
'suite:
X = ActiveWorkbook.VBProject.VBComponents(Msg).CodeModule.CountOfLines
'Stop
For i = 1 To X
nomaraj = ActiveWorkbook.VBProject.VBComponents(Msg).CodeModule.Lines(i, 1)
'MsgBox nomaraj
ncar = Len(nomaraj)
If ncar = 1 Then nomaraj = " '"
If Mid(nomaraj, 1, 3) = "Sub" Then nomaraj = " " & nomaraj: ThisWorkbook.Sheets("Liste fichiers").Cells(Ajout, colonne).Value = nomaraj: colonne = colonne + 1 ': Stop
If Mid(nomaraj, 1, 3) = "Pub" Then nomaraj = " " & nomaraj: ThisWorkbook.Sheets("Liste fichiers").Cells(Ajout, colonne).Value = nomaraj: colonne = colonne + 1
If Mid(nomaraj, 1, 3) = "Pri" Then nomaraj = " " & nomaraj: ThisWorkbook.Sheets("Liste fichiers").Cells(Ajout, colonne).Value = nomaraj: colonne = colonne + 1
If Mid(nomaraj, 1, 3) = "fun" Then nomaraj = " " & nomaraj: ThisWorkbook.Sheets("Liste fichiers").Cells(Ajout, colonne).Value = nomaraj: colonne = colonne + 1
'Cells(Ajout + I, 1) = ActiveWorkbook.VBProject.VBComponents(Msg).CodeModule.Lines(I, 1)
Next
'Ajout = Ajout + X + 2
Next VBCmp
End Sub
Sub Addref()
'http://frederic.sigonneau.free.fr/code/VBE/AjouterSupprimerReference.txt
'ajoute une référence à la bibliothèque
On Error Resume Next
'nom et chemin de la bibliothèque
'nomRef = "C:\Program Files\Fichiers communs\Microsoft Shared\DAO\Dao360.dll"
'Microsoft visual basic for Application Extensibility 5.3
nomRef = "C:\Program Files\Fichiers communs\Microsoft Shared\VBA\VBA6\VBE6EXT.OLB"
ThisWorkbook.VBProject.References.AddFromFile nomRef
End Sub