Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
'
Dim WsDst As Worksheet, WsSrc As Worksheet, i&, DerligSrc&, DerligDst&, Cptr&
Application.ScreenUpdating = False
Set WsSrc = Worksheets("Feuil1")
Set WsDst = Worksheets("Feuil2")
DerligSrc = WsSrc.Range("I" & Rows.Count).End(xlUp).Row
DerligDst = WsDst.Range("A" & Rows.Count).End(xlUp).Row + 1
With WsDst
If Intersect(Target, [I2:I65536]) Is Nothing Then Exit Sub
Cancel = True
If MsgBox("Etes-vous certain de vouloir archiver la ligne ?", vbYesNo, "Demande de confirmation") = vbNo Then Exit Sub
Target.Value = Date
MsgBox (Target.Worksheet.Name & "!" & Target.Address & " = " & Target.Value)
WsDst.Range("A" & DerligDst).Resize(, 21) = WsSrc.Range("I" & Target.Row & ":AC" & Target.Row).Value
WsDst.Range("A" & DerligDst).Resize(, 21).Interior.Color = RGB(146, 208, 80)
DerligDst = WsDst.Range("A" & Rows.Count).End(xlUp).Row + 1
Target.EntireRow.Delete
End With
MsgBox ("La ligne a été archivée")
WsDst.Activate
Set WsDst = Nothing
Set WsSrc = Nothing
End Sub