Avant de fermer le post, pourrais-tu ajouter un ou 2 commentaires a ce code, qui fonctionne tres bien dans ma macro UserForm3.
With ActiveWorkbook
With .VBProject
'cette partie du code est de Laurent Longre
For Each VBC In .VBComponents
If VBC.Type = 100 Then
With VBC.CodeModule
.DeleteLines 1, .CountOfLines
.CodePane.Window.Close
End With
Else: .VBComponents.Remove VBC
End If
Next VBC
End With