1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| Private Sub Ajouter_Click()
Dim Maligne As Long
Dim derl%
Dim derl2%
Dim lofc()
Dim i%
Application.EnableEvents = False
Refresh
derl = Worksheets("NewLOFC").Cells(Rows.Count, 1).End(xlUp).Row
lofc = Worksheets("NewLOFC").Range("A2:J2" & derl).Value
derl2 = Worksheets("data").Cells(Rows.Count, 1).End(xlUp).Row + 1
For i = LBound(lofc, 1) To UBound(lofc, 1)
Worksheets("data").Cells(derl2, 1).Resize(1, 10).Value = _
Array(lofc(i, 1), lofc(i, 2), lofc(i, 3), lofc(i, 4), lofc(i, 5), lofc(i, 6), lofc(i, 7), lofc(i, 8), lofc(i, 9), lofc(i, 10))
Next
Sheets("Data").Activate
Application.EnableEvents = True
End Sub |
Partager