OVH Cloud OVH Cloud

complément de l'éditeur pour lister les subs des modules

13 réponses
Avatar
fetnat
Bonjour,

J'ai utilisé un logiciel addin qui liste tous les modules et toutes les
sub d'un projet.
Je crois que c'était dans les compléments de l'éditeur mais je n'en suis
pas sûr.
A la suite d'un crash, je n'ai plus le logiciel ni son nom.

Quelqu'un peut'il me rappeller le nom de cet utilitaire bien pratique ?

Merci d'avance pour votre aide.

Fetnat

10 réponses

1 2
Avatar
isabelle
bonjour Fetnat,

il y a cette macro réalisé par Alain CROS

'_____________________________________________________________________
Sub ListeMacro()
Dim WK$
WK = ChoixProj
If WK <> "" Then Liste WK
End Sub


Function ChoixProj$()
Dim LeTexte$, LeProj$, I&, J&, K&, L&, MonTab() As String, LeTab
On Error Resume Next
K = Application.VBE.VBProjects.Count
On Error GoTo 0
#If VBA6 Then
Select Case K
Case 0
MsgBox "Impossible d'accéder aux projets VisualBasic": Exit Function
Case 1
MsgBox "Aucun projet disponible": Exit Function
End Select
#Else
If K = 1 Then MsgBox "Aucun projet disponible": Exit Function
L = K
K = Workbooks.Count
#End If
J = 1&
ReDim MonTab(0)
For I = 1& To K
Do
#If VBA6 Then
If Application.VBE.VBProjects(I) Is ThisWorkbook.VBProject Then Exit Do
LeTab = Split(Application.VBE.VBProjects(I).Filename, Application.PathSeparator)
LeProj = Workbooks(LeTab(UBound(LeTab))).Name
#Else
If Workbooks(I) Is ThisWorkbook Then Exit Do
LeProj = Workbooks(I).Name
#End If
LeTexte = LeTexte & vbNewLine & J & " : " & LeProj
ReDim Preserve MonTab(0& To UBound(MonTab) + 1&)
MonTab(UBound(MonTab)) = LeProj
J = J + 1&
Exit Do
Loop
Next I
#If VBA6 Then
#Else
If K < L Then
Dim Elt As AddIn
For Each Elt In Application.AddIns
With Elt
If .Installed = True Then
LeTexte = LeTexte & vbNewLine & J & " : " & .Name
ReDim Preserve MonTab(0& To UBound(MonTab) + 1&)
MonTab(UBound(MonTab)) = .Name
J = J + 1&
End If
End With
Next Elt
End If
#End If
ChoixProj = InputBox(LeTexte, "Choisir un Classeur")
On Error Resume Next
I = CLng(ChoixProj)
If I > J - 1& Then I = 0&
ChoixProj = MonTab(I)
End Function 'AC


Sub Liste(WK$)
Dim DepLine&, FinLine&, I&, AncLine&, LaProc$
Dim MonTab() As String, ModCod As Object
If Workbooks(WK).VBProject.Protection = 1& Then _
MsgBox "Accès impossible car le projet est protégé": Exit Sub
ReDim MonTab(1& To 2&, 1& To 2&)
MonTab(1&, 1&) = Workbooks(WK).FullName
MonTab(1&, 2&) = "Module"
MonTab(2&, 2&) = "Procédure"
For Each ModCod In Workbooks(WK).VBProject.VBComponents
I = UBound(MonTab, 2&) + 1&
ReDim Preserve MonTab(1& To 2&, 1& To I)
With ModCod.CodeModule
MonTab(1&, I) = .Parent.Name
DepLine = .CountOfDeclarationLines
FinLine = .CountOfLines
Do
If FinLine > DepLine Then
On Error Resume Next
For I = 0& To 3&
LaProc = .ProcOfLine(DepLine + 1&, I)
AncLine = .ProcBodyLine(LaProc, I)
DepLine = DepLine + .ProcCountLines(LaProc, I)
If Not Err.Number Then Exit For
Next I
On Error GoTo 0
I = UBound(MonTab, 2&)
If MonTab(2&, I) <> "" Then
I = I + 1&
ReDim Preserve MonTab(1& To 2&, 1& To I)
End If
MonTab(2&, I) = LaProc
Else
Exit Do
End If
Loop
End With
Next
Set ModCod = Nothing
Application.ScreenUpdating = False
Workbooks.Add xlWBATWorksheet
With ActiveWorkbook.ActiveSheet
.Range("A1").Resize(UBound(MonTab, 2&), 2&) = Application.Transpose(MonTab)
With .UsedRange
.Columns(1&).Characters.Font.Bold = True
.Rows(2&).Characters.Font.Bold = True
With .Range("A1").Characters.Font
.Color = vbBlue
.Size = .Size + 2&
End With
.Offset(1).Columns.AutoFit
End With
End With
Application.ScreenUpdating = True
End Sub 'Alain CROS
'_____________________________________________________________________


isabelle


Bonjour,

J'ai utilisé un logiciel addin qui liste tous les modules et toutes les
sub d'un projet.
Je crois que c'était dans les compléments de l'éditeur mais je n'en suis
pas sûr.
A la suite d'un crash, je n'ai plus le logiciel ni son nom.

Quelqu'un peut'il me rappeller le nom de cet utilitaire bien pratique ?

Merci d'avance pour votre aide.

Fetnat


Avatar
fetnat
Merci Madame

Cela ressemble à l'utilitaire que je recherche. Cette macro n'est pas
aussi complète mais c'est une bonne base de départ.

Bonne soirée

Fetnat


bonjour Fetnat,

il y a cette macro réalisé par Alain CROS

'_____________________________________________________________________
Sub ListeMacro()
Dim WK$
WK = ChoixProj
If WK <> "" Then Liste WK
End Sub


Function ChoixProj$()
Dim LeTexte$, LeProj$, I&, J&, K&, L&, MonTab() As String, LeTab
On Error Resume Next
K = Application.VBE.VBProjects.Count
On Error GoTo 0
#If VBA6 Then
Select Case K
Case 0
MsgBox "Impossible d'accéder aux projets VisualBasic": Exit
Function
Case 1
MsgBox "Aucun projet disponible": Exit Function
End Select
#Else
If K = 1 Then MsgBox "Aucun projet disponible": Exit Function
L = K
K = Workbooks.Count
#End If
J = 1&
ReDim MonTab(0)
For I = 1& To K
Do
#If VBA6 Then
If Application.VBE.VBProjects(I) Is ThisWorkbook.VBProject
Then Exit Do
LeTab = Split(Application.VBE.VBProjects(I).Filename,
Application.PathSeparator)
LeProj = Workbooks(LeTab(UBound(LeTab))).Name
#Else
If Workbooks(I) Is ThisWorkbook Then Exit Do
LeProj = Workbooks(I).Name
#End If
LeTexte = LeTexte & vbNewLine & J & " : " & LeProj
ReDim Preserve MonTab(0& To UBound(MonTab) + 1&)
MonTab(UBound(MonTab)) = LeProj
J = J + 1&
Exit Do
Loop
Next I
#If VBA6 Then
#Else
If K < L Then
Dim Elt As AddIn
For Each Elt In Application.AddIns
With Elt
If .Installed = True Then
LeTexte = LeTexte & vbNewLine & J & " : " & .Name
ReDim Preserve MonTab(0& To UBound(MonTab) + 1&)
MonTab(UBound(MonTab)) = .Name
J = J + 1&
End If
End With
Next Elt
End If
#End If
ChoixProj = InputBox(LeTexte, "Choisir un Classeur")
On Error Resume Next
I = CLng(ChoixProj)
If I > J - 1& Then I = 0&
ChoixProj = MonTab(I)
End Function 'AC


Sub Liste(WK$)
Dim DepLine&, FinLine&, I&, AncLine&, LaProc$
Dim MonTab() As String, ModCod As Object
If Workbooks(WK).VBProject.Protection = 1& Then _
MsgBox "Accès impossible car le projet est protégé": Exit Sub
ReDim MonTab(1& To 2&, 1& To 2&)
MonTab(1&, 1&) = Workbooks(WK).FullName
MonTab(1&, 2&) = "Module"
MonTab(2&, 2&) = "Procédure"
For Each ModCod In Workbooks(WK).VBProject.VBComponents
I = UBound(MonTab, 2&) + 1&
ReDim Preserve MonTab(1& To 2&, 1& To I)
With ModCod.CodeModule
MonTab(1&, I) = .Parent.Name
DepLine = .CountOfDeclarationLines
FinLine = .CountOfLines
Do
If FinLine > DepLine Then
On Error Resume Next
For I = 0& To 3&
LaProc = .ProcOfLine(DepLine + 1&, I)
AncLine = .ProcBodyLine(LaProc, I)
DepLine = DepLine + .ProcCountLines(LaProc, I)
If Not Err.Number Then Exit For
Next I
On Error GoTo 0
I = UBound(MonTab, 2&)
If MonTab(2&, I) <> "" Then
I = I + 1&
ReDim Preserve MonTab(1& To 2&, 1& To I)
End If
MonTab(2&, I) = LaProc
Else
Exit Do
End If
Loop
End With
Next
Set ModCod = Nothing
Application.ScreenUpdating = False
Workbooks.Add xlWBATWorksheet
With ActiveWorkbook.ActiveSheet
.Range("A1").Resize(UBound(MonTab, 2&), 2&) =
Application.Transpose(MonTab)
With .UsedRange
.Columns(1&).Characters.Font.Bold = True
.Rows(2&).Characters.Font.Bold = True
With .Range("A1").Characters.Font
.Color = vbBlue
.Size = .Size + 2&
End With
.Offset(1).Columns.AutoFit
End With
End With
Application.ScreenUpdating = True
End Sub 'Alain CROS
'_____________________________________________________________________


isabelle


Bonjour,

J'ai utilisé un logiciel addin qui liste tous les modules et toutes
les sub d'un projet.
Je crois que c'était dans les compléments de l'éditeur mais je n'en
suis pas sûr.
A la suite d'un crash, je n'ai plus le logiciel ni son nom.

Quelqu'un peut'il me rappeller le nom de cet utilitaire bien pratique ?

Merci d'avance pour votre aide.

Fetnat




Avatar
michdenis
Bonjour Fetnat,

Est-ce cet utilitaire que tu recherches ?
mztoolsvba.zip ... qui ajoute un certain nombre de commande
à la fenêtre VBA ...

Si oui, envoie moi une adresse valide et je t'envoie une copie.


Salutations!


"fetnat" a écrit dans le message de news:
Merci Madame

Cela ressemble à l'utilitaire que je recherche. Cette macro n'est pas
aussi complète mais c'est une bonne base de départ.

Bonne soirée

Fetnat


bonjour Fetnat,

il y a cette macro réalisé par Alain CROS

'_____________________________________________________________________
Sub ListeMacro()
Dim WK$
WK = ChoixProj
If WK <> "" Then Liste WK
End Sub


Function ChoixProj$()
Dim LeTexte$, LeProj$, I&, J&, K&, L&, MonTab() As String, LeTab
On Error Resume Next
K = Application.VBE.VBProjects.Count
On Error GoTo 0
#If VBA6 Then
Select Case K
Case 0
MsgBox "Impossible d'accéder aux projets VisualBasic": Exit
Function
Case 1
MsgBox "Aucun projet disponible": Exit Function
End Select
#Else
If K = 1 Then MsgBox "Aucun projet disponible": Exit Function
L = K
K = Workbooks.Count
#End If
J = 1&
ReDim MonTab(0)
For I = 1& To K
Do
#If VBA6 Then
If Application.VBE.VBProjects(I) Is ThisWorkbook.VBProject
Then Exit Do
LeTab = Split(Application.VBE.VBProjects(I).Filename,
Application.PathSeparator)
LeProj = Workbooks(LeTab(UBound(LeTab))).Name
#Else
If Workbooks(I) Is ThisWorkbook Then Exit Do
LeProj = Workbooks(I).Name
#End If
LeTexte = LeTexte & vbNewLine & J & " : " & LeProj
ReDim Preserve MonTab(0& To UBound(MonTab) + 1&)
MonTab(UBound(MonTab)) = LeProj
J = J + 1&
Exit Do
Loop
Next I
#If VBA6 Then
#Else
If K < L Then
Dim Elt As AddIn
For Each Elt In Application.AddIns
With Elt
If .Installed = True Then
LeTexte = LeTexte & vbNewLine & J & " : " & .Name
ReDim Preserve MonTab(0& To UBound(MonTab) + 1&)
MonTab(UBound(MonTab)) = .Name
J = J + 1&
End If
End With
Next Elt
End If
#End If
ChoixProj = InputBox(LeTexte, "Choisir un Classeur")
On Error Resume Next
I = CLng(ChoixProj)
If I > J - 1& Then I = 0&
ChoixProj = MonTab(I)
End Function 'AC


Sub Liste(WK$)
Dim DepLine&, FinLine&, I&, AncLine&, LaProc$
Dim MonTab() As String, ModCod As Object
If Workbooks(WK).VBProject.Protection = 1& Then _
MsgBox "Accès impossible car le projet est protégé": Exit Sub
ReDim MonTab(1& To 2&, 1& To 2&)
MonTab(1&, 1&) = Workbooks(WK).FullName
MonTab(1&, 2&) = "Module"
MonTab(2&, 2&) = "Procédure"
For Each ModCod In Workbooks(WK).VBProject.VBComponents
I = UBound(MonTab, 2&) + 1&
ReDim Preserve MonTab(1& To 2&, 1& To I)
With ModCod.CodeModule
MonTab(1&, I) = .Parent.Name
DepLine = .CountOfDeclarationLines
FinLine = .CountOfLines
Do
If FinLine > DepLine Then
On Error Resume Next
For I = 0& To 3&
LaProc = .ProcOfLine(DepLine + 1&, I)
AncLine = .ProcBodyLine(LaProc, I)
DepLine = DepLine + .ProcCountLines(LaProc, I)
If Not Err.Number Then Exit For
Next I
On Error GoTo 0
I = UBound(MonTab, 2&)
If MonTab(2&, I) <> "" Then
I = I + 1&
ReDim Preserve MonTab(1& To 2&, 1& To I)
End If
MonTab(2&, I) = LaProc
Else
Exit Do
End If
Loop
End With
Next
Set ModCod = Nothing
Application.ScreenUpdating = False
Workbooks.Add xlWBATWorksheet
With ActiveWorkbook.ActiveSheet
.Range("A1").Resize(UBound(MonTab, 2&), 2&) > Application.Transpose(MonTab)
With .UsedRange
.Columns(1&).Characters.Font.Bold = True
.Rows(2&).Characters.Font.Bold = True
With .Range("A1").Characters.Font
.Color = vbBlue
.Size = .Size + 2&
End With
.Offset(1).Columns.AutoFit
End With
End With
Application.ScreenUpdating = True
End Sub 'Alain CROS
'_____________________________________________________________________


isabelle


Bonjour,

J'ai utilisé un logiciel addin qui liste tous les modules et toutes
les sub d'un projet.
Je crois que c'était dans les compléments de l'éditeur mais je n'en
suis pas sûr.
A la suite d'un crash, je n'ai plus le logiciel ni son nom.

Quelqu'un peut'il me rappeller le nom de cet utilitaire bien pratique ?

Merci d'avance pour votre aide.

Fetnat




Avatar
isabelle
voici l'adresse pour le download :

http://www.mztools.com/download/mztoolsvba.zip

isabelle



Bonjour Fetnat,

Est-ce cet utilitaire que tu recherches ?
mztoolsvba.zip ... qui ajoute un certain nombre de commande
à la fenêtre VBA ...

Si oui, envoie moi une adresse valide et je t'envoie une copie.


Salutations!


"fetnat" a écrit dans le message de news:
Merci Madame

Cela ressemble à l'utilitaire que je recherche. Cette macro n'est pas
aussi complète mais c'est une bonne base de départ.

Bonne soirée

Fetnat



bonjour Fetnat,

il y a cette macro réalisé par Alain CROS

'_____________________________________________________________________
Sub ListeMacro()
Dim WK$
WK = ChoixProj
If WK <> "" Then Liste WK
End Sub


Function ChoixProj$()
Dim LeTexte$, LeProj$, I&, J&, K&, L&, MonTab() As String, LeTab
On Error Resume Next
K = Application.VBE.VBProjects.Count
On Error GoTo 0
#If VBA6 Then
Select Case K
Case 0
MsgBox "Impossible d'accéder aux projets VisualBasic": Exit
Function
Case 1
MsgBox "Aucun projet disponible": Exit Function
End Select
#Else
If K = 1 Then MsgBox "Aucun projet disponible": Exit Function
L = K
K = Workbooks.Count
#End If
J = 1&
ReDim MonTab(0)
For I = 1& To K
Do
#If VBA6 Then
If Application.VBE.VBProjects(I) Is ThisWorkbook.VBProject
Then Exit Do
LeTab = Split(Application.VBE.VBProjects(I).Filename,
Application.PathSeparator)
LeProj = Workbooks(LeTab(UBound(LeTab))).Name
#Else
If Workbooks(I) Is ThisWorkbook Then Exit Do
LeProj = Workbooks(I).Name
#End If
LeTexte = LeTexte & vbNewLine & J & " : " & LeProj
ReDim Preserve MonTab(0& To UBound(MonTab) + 1&)
MonTab(UBound(MonTab)) = LeProj
J = J + 1&
Exit Do
Loop
Next I
#If VBA6 Then
#Else
If K < L Then
Dim Elt As AddIn
For Each Elt In Application.AddIns
With Elt
If .Installed = True Then
LeTexte = LeTexte & vbNewLine & J & " : " & .Name
ReDim Preserve MonTab(0& To UBound(MonTab) + 1&)
MonTab(UBound(MonTab)) = .Name
J = J + 1&
End If
End With
Next Elt
End If
#End If
ChoixProj = InputBox(LeTexte, "Choisir un Classeur")
On Error Resume Next
I = CLng(ChoixProj)
If I > J - 1& Then I = 0&
ChoixProj = MonTab(I)
End Function 'AC


Sub Liste(WK$)
Dim DepLine&, FinLine&, I&, AncLine&, LaProc$
Dim MonTab() As String, ModCod As Object
If Workbooks(WK).VBProject.Protection = 1& Then _
MsgBox "Accès impossible car le projet est protégé": Exit Sub
ReDim MonTab(1& To 2&, 1& To 2&)
MonTab(1&, 1&) = Workbooks(WK).FullName
MonTab(1&, 2&) = "Module"
MonTab(2&, 2&) = "Procédure"
For Each ModCod In Workbooks(WK).VBProject.VBComponents
I = UBound(MonTab, 2&) + 1&
ReDim Preserve MonTab(1& To 2&, 1& To I)
With ModCod.CodeModule
MonTab(1&, I) = .Parent.Name
DepLine = .CountOfDeclarationLines
FinLine = .CountOfLines
Do
If FinLine > DepLine Then
On Error Resume Next
For I = 0& To 3&
LaProc = .ProcOfLine(DepLine + 1&, I)
AncLine = .ProcBodyLine(LaProc, I)
DepLine = DepLine + .ProcCountLines(LaProc, I)
If Not Err.Number Then Exit For
Next I
On Error GoTo 0
I = UBound(MonTab, 2&)
If MonTab(2&, I) <> "" Then
I = I + 1&
ReDim Preserve MonTab(1& To 2&, 1& To I)
End If
MonTab(2&, I) = LaProc
Else
Exit Do
End If
Loop
End With
Next
Set ModCod = Nothing
Application.ScreenUpdating = False
Workbooks.Add xlWBATWorksheet
With ActiveWorkbook.ActiveSheet
.Range("A1").Resize(UBound(MonTab, 2&), 2&) >>Application.Transpose(MonTab)
With .UsedRange
.Columns(1&).Characters.Font.Bold = True
.Rows(2&).Characters.Font.Bold = True
With .Range("A1").Characters.Font
.Color = vbBlue
.Size = .Size + 2&
End With
.Offset(1).Columns.AutoFit
End With
End With
Application.ScreenUpdating = True
End Sub 'Alain CROS
'_____________________________________________________________________


isabelle



Bonjour,

J'ai utilisé un logiciel addin qui liste tous les modules et toutes
les sub d'un projet.
Je crois que c'était dans les compléments de l'éditeur mais je n'en
suis pas sûr.
A la suite d'un crash, je n'ai plus le logiciel ni son nom.

Quelqu'un peut'il me rappeller le nom de cet utilitaire bien pratique ?

Merci d'avance pour votre aide.

Fetnat









Avatar
michdenis
C'est du service ça Madame.

;-)


Salutations!


"isabelle" a écrit dans le message de news: %
voici l'adresse pour le download :

http://www.mztools.com/download/mztoolsvba.zip

isabelle



Bonjour Fetnat,

Est-ce cet utilitaire que tu recherches ?
mztoolsvba.zip ... qui ajoute un certain nombre de commande
à la fenêtre VBA ...

Si oui, envoie moi une adresse valide et je t'envoie une copie.


Salutations!


"fetnat" a écrit dans le message de news:
Merci Madame

Cela ressemble à l'utilitaire que je recherche. Cette macro n'est pas
aussi complète mais c'est une bonne base de départ.

Bonne soirée

Fetnat



bonjour Fetnat,

il y a cette macro réalisé par Alain CROS

'_____________________________________________________________________
Sub ListeMacro()
Dim WK$
WK = ChoixProj
If WK <> "" Then Liste WK
End Sub


Function ChoixProj$()
Dim LeTexte$, LeProj$, I&, J&, K&, L&, MonTab() As String, LeTab
On Error Resume Next
K = Application.VBE.VBProjects.Count
On Error GoTo 0
#If VBA6 Then
Select Case K
Case 0
MsgBox "Impossible d'accéder aux projets VisualBasic": Exit
Function
Case 1
MsgBox "Aucun projet disponible": Exit Function
End Select
#Else
If K = 1 Then MsgBox "Aucun projet disponible": Exit Function
L = K
K = Workbooks.Count
#End If
J = 1&
ReDim MonTab(0)
For I = 1& To K
Do
#If VBA6 Then
If Application.VBE.VBProjects(I) Is ThisWorkbook.VBProject
Then Exit Do
LeTab = Split(Application.VBE.VBProjects(I).Filename,
Application.PathSeparator)
LeProj = Workbooks(LeTab(UBound(LeTab))).Name
#Else
If Workbooks(I) Is ThisWorkbook Then Exit Do
LeProj = Workbooks(I).Name
#End If
LeTexte = LeTexte & vbNewLine & J & " : " & LeProj
ReDim Preserve MonTab(0& To UBound(MonTab) + 1&)
MonTab(UBound(MonTab)) = LeProj
J = J + 1&
Exit Do
Loop
Next I
#If VBA6 Then
#Else
If K < L Then
Dim Elt As AddIn
For Each Elt In Application.AddIns
With Elt
If .Installed = True Then
LeTexte = LeTexte & vbNewLine & J & " : " & .Name
ReDim Preserve MonTab(0& To UBound(MonTab) + 1&)
MonTab(UBound(MonTab)) = .Name
J = J + 1&
End If
End With
Next Elt
End If
#End If
ChoixProj = InputBox(LeTexte, "Choisir un Classeur")
On Error Resume Next
I = CLng(ChoixProj)
If I > J - 1& Then I = 0&
ChoixProj = MonTab(I)
End Function 'AC


Sub Liste(WK$)
Dim DepLine&, FinLine&, I&, AncLine&, LaProc$
Dim MonTab() As String, ModCod As Object
If Workbooks(WK).VBProject.Protection = 1& Then _
MsgBox "Accès impossible car le projet est protégé": Exit Sub
ReDim MonTab(1& To 2&, 1& To 2&)
MonTab(1&, 1&) = Workbooks(WK).FullName
MonTab(1&, 2&) = "Module"
MonTab(2&, 2&) = "Procédure"
For Each ModCod In Workbooks(WK).VBProject.VBComponents
I = UBound(MonTab, 2&) + 1&
ReDim Preserve MonTab(1& To 2&, 1& To I)
With ModCod.CodeModule
MonTab(1&, I) = .Parent.Name
DepLine = .CountOfDeclarationLines
FinLine = .CountOfLines
Do
If FinLine > DepLine Then
On Error Resume Next
For I = 0& To 3&
LaProc = .ProcOfLine(DepLine + 1&, I)
AncLine = .ProcBodyLine(LaProc, I)
DepLine = DepLine + .ProcCountLines(LaProc, I)
If Not Err.Number Then Exit For
Next I
On Error GoTo 0
I = UBound(MonTab, 2&)
If MonTab(2&, I) <> "" Then
I = I + 1&
ReDim Preserve MonTab(1& To 2&, 1& To I)
End If
MonTab(2&, I) = LaProc
Else
Exit Do
End If
Loop
End With
Next
Set ModCod = Nothing
Application.ScreenUpdating = False
Workbooks.Add xlWBATWorksheet
With ActiveWorkbook.ActiveSheet
.Range("A1").Resize(UBound(MonTab, 2&), 2&) >>Application.Transpose(MonTab)
With .UsedRange
.Columns(1&).Characters.Font.Bold = True
.Rows(2&).Characters.Font.Bold = True
With .Range("A1").Characters.Font
.Color = vbBlue
.Size = .Size + 2&
End With
.Offset(1).Columns.AutoFit
End With
End With
Application.ScreenUpdating = True
End Sub 'Alain CROS
'_____________________________________________________________________


isabelle



Bonjour,

J'ai utilisé un logiciel addin qui liste tous les modules et toutes
les sub d'un projet.
Je crois que c'était dans les compléments de l'éditeur mais je n'en
suis pas sûr.
A la suite d'un crash, je n'ai plus le logiciel ni son nom.

Quelqu'un peut'il me rappeller le nom de cet utilitaire bien pratique ?

Merci d'avance pour votre aide.

Fetnat









Avatar
fetnat
Bonsoir Isabelle et MichDenis

Après des heures de recherches, je viens de retrouver le prog. en
question grâce à un lien archivé dans les favoris.

C'est Code Documentor (AppsPro)

http://www.appspro.com/Utilities/Documentor.htm

Maintenant, je vais tester mztools que je ne connais pas.

Et noter les utilitaires sympa que j'utilise en cas de crash. Je n'ai
pas perdu de fichiers mais une liste des outils est salutaire.

Bonne soirée et merci pour votre aide.

fetnat

voici l'adresse pour le download :

http://www.mztools.com/download/mztoolsvba.zip

isabelle



Bonjour Fetnat,

Est-ce cet utilitaire que tu recherches ?
mztoolsvba.zip ... qui ajoute un certain nombre de commande
à la fenêtre VBA ...

Si oui, envoie moi une adresse valide et je t'envoie une copie.


Salutations!


"fetnat" a écrit dans le message de news:

Merci Madame

Cela ressemble à l'utilitaire que je recherche. Cette macro n'est pas
aussi complète mais c'est une bonne base de départ.

Bonne soirée

Fetnat



bonjour Fetnat,

il y a cette macro réalisé par Alain CROS

'_____________________________________________________________________
Sub ListeMacro()
Dim WK$
WK = ChoixProj
If WK <> "" Then Liste WK
End Sub


Function ChoixProj$()
Dim LeTexte$, LeProj$, I&, J&, K&, L&, MonTab() As String, LeTab
On Error Resume Next
K = Application.VBE.VBProjects.Count
On Error GoTo 0
#If VBA6 Then
Select Case K
Case 0
MsgBox "Impossible d'accéder aux projets VisualBasic": Exit
Function
Case 1
MsgBox "Aucun projet disponible": Exit Function
End Select
#Else
If K = 1 Then MsgBox "Aucun projet disponible": Exit Function
L = K
K = Workbooks.Count
#End If
J = 1&
ReDim MonTab(0)
For I = 1& To K
Do
#If VBA6 Then
If Application.VBE.VBProjects(I) Is ThisWorkbook.VBProject
Then Exit Do
LeTab = Split(Application.VBE.VBProjects(I).Filename,
Application.PathSeparator)
LeProj = Workbooks(LeTab(UBound(LeTab))).Name
#Else
If Workbooks(I) Is ThisWorkbook Then Exit Do
LeProj = Workbooks(I).Name
#End If
LeTexte = LeTexte & vbNewLine & J & " : " & LeProj
ReDim Preserve MonTab(0& To UBound(MonTab) + 1&)
MonTab(UBound(MonTab)) = LeProj
J = J + 1&
Exit Do
Loop
Next I
#If VBA6 Then
#Else
If K < L Then
Dim Elt As AddIn
For Each Elt In Application.AddIns
With Elt
If .Installed = True Then
LeTexte = LeTexte & vbNewLine & J & " : " & .Name
ReDim Preserve MonTab(0& To UBound(MonTab) + 1&)
MonTab(UBound(MonTab)) = .Name
J = J + 1&
End If
End With
Next Elt
End If
#End If
ChoixProj = InputBox(LeTexte, "Choisir un Classeur")
On Error Resume Next
I = CLng(ChoixProj)
If I > J - 1& Then I = 0&
ChoixProj = MonTab(I)
End Function 'AC


Sub Liste(WK$)
Dim DepLine&, FinLine&, I&, AncLine&, LaProc$
Dim MonTab() As String, ModCod As Object
If Workbooks(WK).VBProject.Protection = 1& Then _
MsgBox "Accès impossible car le projet est protégé": Exit Sub
ReDim MonTab(1& To 2&, 1& To 2&)
MonTab(1&, 1&) = Workbooks(WK).FullName
MonTab(1&, 2&) = "Module"
MonTab(2&, 2&) = "Procédure"
For Each ModCod In Workbooks(WK).VBProject.VBComponents
I = UBound(MonTab, 2&) + 1&
ReDim Preserve MonTab(1& To 2&, 1& To I)
With ModCod.CodeModule
MonTab(1&, I) = .Parent.Name
DepLine = .CountOfDeclarationLines
FinLine = .CountOfLines
Do
If FinLine > DepLine Then
On Error Resume Next
For I = 0& To 3&
LaProc = .ProcOfLine(DepLine + 1&, I)
AncLine = .ProcBodyLine(LaProc, I)
DepLine = DepLine + .ProcCountLines(LaProc, I)
If Not Err.Number Then Exit For
Next I
On Error GoTo 0
I = UBound(MonTab, 2&)
If MonTab(2&, I) <> "" Then
I = I + 1&
ReDim Preserve MonTab(1& To 2&, 1& To I)
End If
MonTab(2&, I) = LaProc
Else
Exit Do
End If
Loop
End With
Next
Set ModCod = Nothing
Application.ScreenUpdating = False
Workbooks.Add xlWBATWorksheet
With ActiveWorkbook.ActiveSheet
.Range("A1").Resize(UBound(MonTab, 2&), 2&) >>> Application.Transpose(MonTab)
With .UsedRange
.Columns(1&).Characters.Font.Bold = True
.Rows(2&).Characters.Font.Bold = True
With .Range("A1").Characters.Font
.Color = vbBlue
.Size = .Size + 2&
End With
.Offset(1).Columns.AutoFit
End With
End With
Application.ScreenUpdating = True
End Sub 'Alain CROS
'_____________________________________________________________________


isabelle



Bonjour,

J'ai utilisé un logiciel addin qui liste tous les modules et toutes
les sub d'un projet.
Je crois que c'était dans les compléments de l'éditeur mais je n'en
suis pas sûr.
A la suite d'un crash, je n'ai plus le logiciel ni son nom.

Quelqu'un peut'il me rappeller le nom de cet utilitaire bien pratique ?

Merci d'avance pour votre aide.

Fetnat












Avatar
Modeste
Bonsour® isabelle avec ferveur ;o))) vous nous disiez :

voici l'adresse pour le download :

http://www.mztools.com/download/mztoolsvba.zip


il existe aussi depuis longtemps ceci :
http://www.bmsltd.ie/DLCount/DLCount.asp?fileÊllTree.zip
nb: l'installation sous XP pose quelques soucis,
l'utilisation s'avère quand même possible
../..
This routine reads all of the modules in selected open workbooks, extracting
a complete list of procedures and the calls between them. From this it
generates some pivot tables, enabling you to easily identify which
procedures call, or are called by another procedure and how many calls there
are between the modules. Finally, it displays a procedure flow diagram for
the workbook in a tree structure. The zip file contains a single xls file,
which is hidden when opened. This update fixes a few problems reported by
some users and also handles multi-workbook projects (when referenced using
Tools, References). Documentation is included in the zip file.
../..


isabelle



Bonjour Fetnat,

Est-ce cet utilitaire que tu recherches ?
mztoolsvba.zip ... qui ajoute un certain nombre de commande
à la fenêtre VBA ...

Si oui, envoie moi une adresse valide et je t'envoie une copie.


Salutations!


"fetnat" a écrit dans le message de news:
Merci Madame

Cela ressemble à l'utilitaire que je recherche. Cette macro n'est pas
aussi complète mais c'est une bonne base de départ.

Bonne soirée

Fetnat



bonjour Fetnat,

il y a cette macro réalisé par Alain CROS

'_____________________________________________________________________
Sub ListeMacro()
Dim WK$
WK = ChoixProj
If WK <> "" Then Liste WK
End Sub


Function ChoixProj$()
Dim LeTexte$, LeProj$, I&, J&, K&, L&, MonTab() As String, LeTab
On Error Resume Next
K = Application.VBE.VBProjects.Count
On Error GoTo 0
#If VBA6 Then
Select Case K
Case 0
MsgBox "Impossible d'accéder aux projets VisualBasic": Exit
Function
Case 1
MsgBox "Aucun projet disponible": Exit Function
End Select
#Else
If K = 1 Then MsgBox "Aucun projet disponible": Exit Function
L = K
K = Workbooks.Count
#End If
J = 1&
ReDim MonTab(0)
For I = 1& To K
Do
#If VBA6 Then
If Application.VBE.VBProjects(I) Is ThisWorkbook.VBProject
Then Exit Do
LeTab = Split(Application.VBE.VBProjects(I).Filename,
Application.PathSeparator)
LeProj = Workbooks(LeTab(UBound(LeTab))).Name
#Else
If Workbooks(I) Is ThisWorkbook Then Exit Do
LeProj = Workbooks(I).Name
#End If
LeTexte = LeTexte & vbNewLine & J & " : " & LeProj
ReDim Preserve MonTab(0& To UBound(MonTab) + 1&)
MonTab(UBound(MonTab)) = LeProj
J = J + 1&
Exit Do
Loop
Next I
#If VBA6 Then
#Else
If K < L Then
Dim Elt As AddIn
For Each Elt In Application.AddIns
With Elt
If .Installed = True Then
LeTexte = LeTexte & vbNewLine & J & " : " &
.Name
ReDim Preserve MonTab(0& To UBound(MonTab) +
1&)
MonTab(UBound(MonTab)) = .Name
J = J + 1&
End If
End With
Next Elt
End If
#End If
ChoixProj = InputBox(LeTexte, "Choisir un Classeur")
On Error Resume Next
I = CLng(ChoixProj)
If I > J - 1& Then I = 0&
ChoixProj = MonTab(I)
End Function 'AC


Sub Liste(WK$)
Dim DepLine&, FinLine&, I&, AncLine&, LaProc$
Dim MonTab() As String, ModCod As Object
If Workbooks(WK).VBProject.Protection = 1& Then _
MsgBox "Accès impossible car le projet est protégé": Exit Sub
ReDim MonTab(1& To 2&, 1& To 2&)
MonTab(1&, 1&) = Workbooks(WK).FullName
MonTab(1&, 2&) = "Module"
MonTab(2&, 2&) = "Procédure"
For Each ModCod In Workbooks(WK).VBProject.VBComponents
I = UBound(MonTab, 2&) + 1&
ReDim Preserve MonTab(1& To 2&, 1& To I)
With ModCod.CodeModule
MonTab(1&, I) = .Parent.Name
DepLine = .CountOfDeclarationLines
FinLine = .CountOfLines
Do
If FinLine > DepLine Then
On Error Resume Next
For I = 0& To 3&
LaProc = .ProcOfLine(DepLine + 1&, I)
AncLine = .ProcBodyLine(LaProc, I)
DepLine = DepLine + .ProcCountLines(LaProc, I)
If Not Err.Number Then Exit For
Next I
On Error GoTo 0
I = UBound(MonTab, 2&)
If MonTab(2&, I) <> "" Then
I = I + 1&
ReDim Preserve MonTab(1& To 2&, 1& To I)
End If
MonTab(2&, I) = LaProc
Else
Exit Do
End If
Loop
End With
Next
Set ModCod = Nothing
Application.ScreenUpdating = False
Workbooks.Add xlWBATWorksheet
With ActiveWorkbook.ActiveSheet
.Range("A1").Resize(UBound(MonTab, 2&), 2&) > > > Application.Transpose(MonTab)
With .UsedRange
.Columns(1&).Characters.Font.Bold = True
.Rows(2&).Characters.Font.Bold = True
With .Range("A1").Characters.Font
.Color = vbBlue
.Size = .Size + 2&
End With
.Offset(1).Columns.AutoFit
End With
End With
Application.ScreenUpdating = True
End Sub 'Alain CROS
'_____________________________________________________________________


isabelle



Bonjour,

J'ai utilisé un logiciel addin qui liste tous les modules et toutes
les sub d'un projet.
Je crois que c'était dans les compléments de l'éditeur mais je n'en
suis pas sûr.
A la suite d'un crash, je n'ai plus le logiciel ni son nom.

Quelqu'un peut'il me rappeller le nom de cet utilitaire bien
pratique ?

Merci d'avance pour votre aide.

Fetnat





--
;o)))
@+

Les news à la source !!!
news://news.microsoft.com/microsoft.public.fr.excel
et répondez OUI

n'oubliez pas les FAQ :http://www.excelabo.net
http://dj.joss.free.fr/faq.htm
http://www.faqoe.com http://faqword.free.fr




Avatar
isabelle
hello modeste,

cette partie :

"identifier que l'appel de procédures est appelé selon une autre procédure
et combien d'appels il y a entre les modules."

me semble très intéressante, l'as tu essayé, est ce la parti qui cause problème ?

isabelle

Bonsour® isabelle avec ferveur ;o))) vous nous disiez :


voici l'adresse pour le download :

http://www.mztools.com/download/mztoolsvba.zip



il existe aussi depuis longtemps ceci :
http://www.bmsltd.ie/DLCount/DLCount.asp?fileÊllTree.zip
nb: l'installation sous XP pose quelques soucis,
l'utilisation s'avère quand même possible
../..
This routine reads all of the modules in selected open workbooks, extracting
a complete list of procedures and the calls between them. From this it
generates some pivot tables, enabling you to easily identify which
procedures call, or are called by another procedure and how many calls there
are between the modules. Finally, it displays a procedure flow diagram for
the workbook in a tree structure. The zip file contains a single xls file,
which is hidden when opened. This update fixes a few problems reported by
some users and also handles multi-workbook projects (when referenced using
Tools, References). Documentation is included in the zip file.
../..


isabelle




Bonjour Fetnat,

Est-ce cet utilitaire que tu recherches ?
mztoolsvba.zip ... qui ajoute un certain nombre de commande
à la fenêtre VBA ...

Si oui, envoie moi une adresse valide et je t'envoie une copie.


Salutations!


"fetnat" a écrit dans le message de news:
Merci Madame

Cela ressemble à l'utilitaire que je recherche. Cette macro n'est pas
aussi complète mais c'est une bonne base de départ.

Bonne soirée

Fetnat




bonjour Fetnat,

il y a cette macro réalisé par Alain CROS

'_____________________________________________________________________
Sub ListeMacro()
Dim WK$
WK = ChoixProj
If WK <> "" Then Liste WK
End Sub


Function ChoixProj$()
Dim LeTexte$, LeProj$, I&, J&, K&, L&, MonTab() As String, LeTab
On Error Resume Next
K = Application.VBE.VBProjects.Count
On Error GoTo 0
#If VBA6 Then
Select Case K
Case 0
MsgBox "Impossible d'accéder aux projets VisualBasic": Exit
Function
Case 1
MsgBox "Aucun projet disponible": Exit Function
End Select
#Else
If K = 1 Then MsgBox "Aucun projet disponible": Exit Function
L = K
K = Workbooks.Count
#End If
J = 1&
ReDim MonTab(0)
For I = 1& To K
Do
#If VBA6 Then
If Application.VBE.VBProjects(I) Is ThisWorkbook.VBProject
Then Exit Do
LeTab = Split(Application.VBE.VBProjects(I).Filename,
Application.PathSeparator)
LeProj = Workbooks(LeTab(UBound(LeTab))).Name
#Else
If Workbooks(I) Is ThisWorkbook Then Exit Do
LeProj = Workbooks(I).Name
#End If
LeTexte = LeTexte & vbNewLine & J & " : " & LeProj
ReDim Preserve MonTab(0& To UBound(MonTab) + 1&)
MonTab(UBound(MonTab)) = LeProj
J = J + 1&
Exit Do
Loop
Next I
#If VBA6 Then
#Else
If K < L Then
Dim Elt As AddIn
For Each Elt In Application.AddIns
With Elt
If .Installed = True Then
LeTexte = LeTexte & vbNewLine & J & " : " &
.Name
ReDim Preserve MonTab(0& To UBound(MonTab) +
1&)
MonTab(UBound(MonTab)) = .Name
J = J + 1&
End If
End With
Next Elt
End If
#End If
ChoixProj = InputBox(LeTexte, "Choisir un Classeur")
On Error Resume Next
I = CLng(ChoixProj)
If I > J - 1& Then I = 0&
ChoixProj = MonTab(I)
End Function 'AC


Sub Liste(WK$)
Dim DepLine&, FinLine&, I&, AncLine&, LaProc$
Dim MonTab() As String, ModCod As Object
If Workbooks(WK).VBProject.Protection = 1& Then _
MsgBox "Accès impossible car le projet est protégé": Exit Sub
ReDim MonTab(1& To 2&, 1& To 2&)
MonTab(1&, 1&) = Workbooks(WK).FullName
MonTab(1&, 2&) = "Module"
MonTab(2&, 2&) = "Procédure"
For Each ModCod In Workbooks(WK).VBProject.VBComponents
I = UBound(MonTab, 2&) + 1&
ReDim Preserve MonTab(1& To 2&, 1& To I)
With ModCod.CodeModule
MonTab(1&, I) = .Parent.Name
DepLine = .CountOfDeclarationLines
FinLine = .CountOfLines
Do
If FinLine > DepLine Then
On Error Resume Next
For I = 0& To 3&
LaProc = .ProcOfLine(DepLine + 1&, I)
AncLine = .ProcBodyLine(LaProc, I)
DepLine = DepLine + .ProcCountLines(LaProc, I)
If Not Err.Number Then Exit For
Next I
On Error GoTo 0
I = UBound(MonTab, 2&)
If MonTab(2&, I) <> "" Then
I = I + 1&
ReDim Preserve MonTab(1& To 2&, 1& To I)
End If
MonTab(2&, I) = LaProc
Else
Exit Do
End If
Loop
End With
Next
Set ModCod = Nothing
Application.ScreenUpdating = False
Workbooks.Add xlWBATWorksheet
With ActiveWorkbook.ActiveSheet
.Range("A1").Resize(UBound(MonTab, 2&), 2&) >>>>Application.Transpose(MonTab)
With .UsedRange
.Columns(1&).Characters.Font.Bold = True
.Rows(2&).Characters.Font.Bold = True
With .Range("A1").Characters.Font
.Color = vbBlue
.Size = .Size + 2&
End With
.Offset(1).Columns.AutoFit
End With
End With
Application.ScreenUpdating = True
End Sub 'Alain CROS
'_____________________________________________________________________


isabelle




Bonjour,

J'ai utilisé un logiciel addin qui liste tous les modules et toutes
les sub d'un projet.
Je crois que c'était dans les compléments de l'éditeur mais je n'en
suis pas sûr.
A la suite d'un crash, je n'ai plus le logiciel ni son nom.

Quelqu'un peut'il me rappeller le nom de cet utilitaire bien
pratique ?

Merci d'avance pour votre aide.

Fetnat












Avatar
ThierryP
Bonjour isabelle, bonjour modeste,

je m'immisce dans votre ficelle, car j'ai une p'tite question sur
CallTree, que j'ai essayé il y a quelques temps sans succès...Quand je
le lance, la fenêtre ne me propose aucun nom, même si d'autres classeurs
sont ouverts ????? Une idée....??

D'avance merci

hello modeste,

cette partie :

"identifier que l'appel de procédures est appelé selon une autre procédure
et combien d'appels il y a entre les modules."

me semble très intéressante, l'as tu essayé, est ce la parti qui cause
problème ?

isabelle

Bonsour® isabelle avec ferveur ;o))) vous nous disiez :


voici l'adresse pour le download :

http://www.mztools.com/download/mztoolsvba.zip



il existe aussi depuis longtemps ceci :
http://www.bmsltd.ie/DLCount/DLCount.asp?fileÊllTree.zip
nb: l'installation sous XP pose quelques soucis,
l'utilisation s'avère quand même possible
../..
This routine reads all of the modules in selected open workbooks,
extracting a complete list of procedures and the calls between them.
From this it generates some pivot tables, enabling you to easily
identify which procedures call, or are called by another procedure and
how many calls there are between the modules. Finally, it displays a
procedure flow diagram for the workbook in a tree structure. The zip
file contains a single xls file, which is hidden when opened. This
update fixes a few problems reported by some users and also handles
multi-workbook projects (when referenced using Tools, References).
Documentation is included in the zip file.
../..


isabelle




--
@+ thierryp



Avatar
Modeste
Bonsour® isabelle avec ferveur ;o))) vous nous disiez :

"identifier que l'appel de procédures est appelé selon une autre procédure
et combien d'appels il y a entre les modules."

me semble très intéressante, l'as tu essayé


Oui c'est une procédure que je connais et utilise depuis trés longtemps
(XL97)

les soucis viennent en fait que c'est justement un fichier XL97 !!!!!

Avertissement traduction Bla-bla-bla....
Ajout d'un item dans le menu Outils
Create Procédure CallTree( mais cet item ne semble pas fonctionnel)

il faut alors cocher dans les macros complémentaires la macro Call Tree 97
il y a alors ajout dans le menu Outils d'un nouvel item : Procédure CallTree

à noter également les graphismes du TreeWiew qui ne s'affiche pas
correctement ????
devrait utiliser la police Terminal
dans module ModProcOrder Sub ShowTree()

'Define some characters to use for the tree
B = " " 'Blanks
T = " ÃÄÄ " 'T junctions
l = " ÀÄÄ " 'L junctions
i = " ³ " '| lines

exemple :
[GD_Lunaire.xls]ThisWorkbook.Workbook_Open
ÀÄÄ [GD_Lunaire.xls]Module1.Initialisation
ÀÄÄ [GD_Lunaire.xls]Module2.Bouton13_QuandClic
ÃÄÄ [GD_Lunaire.xls]Module4.Stop_It
ÃÄÄ [GD_Lunaire.xls]Module5.GMT
ÃÄÄ [GD_Lunaire.xls]Module2.Show_Ombre
ÃÄÄ [GD_Lunaire.xls]Module4.Stop_It
ÀÄÄ [GD_Lunaire.xls]Module4.parler


que j'ai finalement modifié comme ceci :
'Define some characters to use for the tree
B = " " 'Blanks
T = " +-- " 'T junctions
l = " __ " 'L junctions
i = " | " '| lines
avec affichage Courier new
exemple :
[GD_Lunaire.xls]ThisWorkbook.Workbook_Open
__ [GD_Lunaire.xls]Module1.Initialisation
__ [GD_Lunaire.xls]Module2.Bouton13_QuandClic
+-- [GD_Lunaire.xls]Module4.Stop_It
+-- [GD_Lunaire.xls]Module5.GMT
+-- [GD_Lunaire.xls]Module2.Show_Ombre
+-- [GD_Lunaire.xls]Module4.Stop_It
__ [GD_Lunaire.xls]Module4.parler








--
;o)))
@+

Les news à la source !!!
news://news.microsoft.com/microsoft.public.fr.excel
et répondez OUI

n'oubliez pas les FAQ :http://www.excelabo.net
http://dj.joss.free.fr/faq.htm
http://www.faqoe.com http://faqword.free.fr

1 2