Private Sub CommandButton1_Click()
Dim Wh As Worksheet, Wh2 As Worksheet
Dim Dl As Integer, Dl2 As Integer, i As Integer, j As Integer
Set Wh = Worksheets("form"): Set Wh2 = Worksheets("synthese")
Dl = Range("D65536").End(xlUp).Row
For i = 2 To Dl
ActiveWorkbook.Sheets.Add after:=ActiveSheet
With ActiveSheet
.Name = Wh.Range("D" & i).Value
.Cells(2, 2).Value = Wh.Cells(1, 4)
.Cells(2, 3).Value = Wh.Cells(1, 1)
.Cells(2, 4).Value = Wh.Cells(1, 2)
.Cells(2, 5).Value = Wh.Cells(1, 3)
.Cells(3, 2).Value = Wh.Cells(i, 4)
.Cells(3, 3).Value = Wh.Cells(i, 1)
.Cells(3, 4).Value = Wh.Cells(i, 2)
.Cells(3, 5).Value = Wh.Cells(i, 3)
.Cells(9, 2) = "Coté"
.Cells(10, 2) = "Dessus"
.Cells(11, 2) = "Int Vertical"
.Cells(12, 2) = "Int Horizontal"
.Cells(9, 3) = .Cells(3, 3) & .Cells(3, 4)
.Cells(10, 3) = .Cells(9, 3)
.Cells(11, 3) = .Cells(3, 4) - .Cells(3, 5)
.Cells(12, 3) = .Cells(3, 3) - .Cells(3, 5)
End With
Dl2 = Wh2.Range("C65536").End(xlUp).Row
ActiveSheet.Range("B9:C12").Copy Wh2.Range("B" & Dl2 + 1)
Wh2.Range("A" & Dl2 + 1) = ActiveSheet.Name
Next i
Dl2 = Wh2.Range("C65536").End(xlUp).Row
Wh2.Range("C2:C" & Dl2).Cut Wh2.Range("D2")
Wh2.Range("A2:A" & Dl2).Cut Wh2.Range("C2")
End Sub