Re : Par Macro, enregistrer le fichier sans les Macros
Bonjour malabarbe, MJ13, Le Forum
Question mainte fois traitée.
Ci dessous un petit code probablement récupèré sur ce Forum
Code:
'- le projet à exporter ne doit pas être protégé
'- la librairie Microsoft Visual Basic Extensibility 5.x doit être cochée
Sub copieFeuilleSansModulesNiMacro()
Dim i As Integer
Dim oComposant As VBComponent
Dim sNomModule As String, LigneTitre As String
ThisWorkbook.Sheets("Feuil1").Copy
For Each oComposant In ActiveWorkbook.VBProject.VBComponents
sNomModule = oComposant.Name
If oComposant.Type = vbext_ct_ClassModule Or vbext_ct_StdModule Or vbext_ct_MSForm Then
With oComposant.CodeModule
.DeleteLines 1, .CountOfLines
End With
End If
Next oComposant
End Sub