Option Explicit
Sub test()
Dim i As Integer
Workbooks("Matrice.xlsm").Save
Application.DisplayAlerts = False
For i = 3 To 10
Sheets(i).Delete
Next i
Application.DisplayAlerts = True
ActiveWorkbook.SaveAs "nom fichier"
End Sub
attention macro s'applique sur le classeur actif
Sub test()
Dim i As Integer
Workbooks("Matrise.xlsm").Save
Application.DisplayAlerts = False
For i = 10 To 3 Step -1
Sheets(i).Delete
Next i
Application.DisplayAlerts = True
ActiveWorkbook.SaveAs "Nom"
End Sub
Option Explicit
Sub test()
Dim i As Integer, x As String
Workbooks("Matrise.xlsm").Save
Application.DisplayAlerts = False
For i = 10 To 3 Step -1
Sheets(i).Delete
Next i
Application.DisplayAlerts = True
x = InputBox("Nom fichier ?")
If x <> "" Then ActiveWorkbook.SaveAs x
End Sub