ActiveWorkbook.SaveAs DossierSauvegarde2 & Nomfichier & " " & xlsx
[COLOR="Blue"]With ActiveWorkbook.VBProject
For Each Vbc In .VBComponents 'tous les types de modules seront effacés
Select Case Vbc.Type
Case 1, 2, 3
.VBComponents.Remove Vbc
Case 100
Vbc.CodeModule.DeleteLines 1, Vbc.CodeModule.CountOfLines
End Select
Next Vbc
End With[/COLOR]
ActiveWorkbook.SaveAs DossierSauvegarde3 & Nomfichier & " " & xlsx
[COLOR="RoyalBlue"]With ActiveWorkbook.VBProject
For Each Vbc In .VBComponents 'tous les types de modules seront effacés
Select Case Vbc.Type
Case 1, 2, 3
.VBComponents.Remove Vbc
Case 100
Vbc.CodeModule.DeleteLines 1, Vbc.CodeModule.CountOfLines
End Select
Next Vbc
End With[/COLOR]