Private Sub CommandButton1_Click()
Dim Ctrl As Control Dim r As Integer
Dim Derligne As Integer
Dim LigneDebut As Long
Dim x As Integer, L As Integer, nombre_de_colonne As Integer
Dim Ligne As Long, Celluledebut As Integer, Cellulefin As Integer
Dim Ind As Integer, sTabF() As String
' Définir le tableau des feuilles à modifier
sTabF = Split("Feuil1,Feuil2", ",")
' Pour chaque feuille
For Ind = 0 To UBound(sTabF)
' Avec la feuille "Ind"
With Worksheets(sTabF(Ind))
LigneDebut = 12
Derligne = .Range("A" & Cells.Rows.Count).End(xlUp).Row + 1
Ligne = Derligne
Celluledebut = 3: Cellulefin = 7
.Range(.Cells(Ligne, Celluledebut), .Cells(Ligne, Cellulefin)).Merge
For Each Ctrl In UserForm1.Controls
r = Val(Ctrl.Tag)
If r > 0 Then .Cells(Derligne, r) = Ctrl
Next
' Mettre le total du tableau
nombre_de_colonne = 2
L = .Cells(Rows.Count, 1).End(xlUp).Row
For x = 2 To nombre_de_colonne
.Cells(L + 1, x).Formula = "=SUM(" & .Cells(12, x).Address & ":" & .Cells(L, x).Address & ")"
Next
End With
Next Ind
TextBox1 = ""
Unload Me
End Sub