Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Dim inv As Workbook '[COLOR="Red"]et pas inventaire, comme noté précédemment ![/COLOR]
Dim PdT As String
Dim maPlage As Range, Cible As Range
Set inv = Workbooks("inventaire.xls")
If Not Application.Intersect(Target, ActiveSheet.Range("A:A")) Is Nothing Then
For i = 5 To 14
PdT = ActiveSheet.Cells(2, i)
If ActiveSheet.Cells(Target.Row, i) <> "" Then
Set Cible = inv.Sheets(PdT).Range("A" & inv.Sheets(PdT).Range("A65000").End(xlUp).Row + 1)
Set maPlage = Application.Union(ActiveSheet.Range(Cells(Target.Row, 1), Cells(Target.Row, 4)), ActiveSheet.Cells(Target.Row, i))
maPlage.Copy
Cible.PasteSpecial Paste:=xlPasteValuesAndNumberFormats
End If
Next i
ActiveSheet.Range(Cells(Target.Row, 1), Cells(Target.Row, 14)).Interior.ColorIndex = 4
End If
Cancel = True
End Sub