Private Sub Worksheet_BeforeDoubleClick(ByVal R As Range, Cancel As Boolean)
If Intersect(R, Columns(4)) Is Nothing Then Exit Sub
Cancel = 1
If Not R.Font.Bold Then
Dl = [D1000].End(xlUp).Row
Set C = R(1, 0)
Select Case R(1, 0).Interior.ColorIndex
Case 3
If C = "©" Then C = "": C.Interior.ColorIndex = xlNone
Case 4
If C = "©" Then C = "": C.Interior.ColorIndex = xlNone
Case xlNone
If Application.CountIf(Columns(3), "©") = 0 Then
C.Interior.ColorIndex = 3: C = "©": Ld = R.Row
Else
C.Interior.ColorIndex = 4
If MsgBox("confirmer le déplacement :", vbYesNo, "déplacer là ?") = 7 Then
C.Interior.ColorIndex = xlNone: Exit Sub
Else
Cells(Ld, 3) = ""
Rows(Ld).Cut
Rows(R.Row).Insert Shift:=xlDown
Range("C19:M" & Dl, "O19:O" & Dl).Borders.LineStyle = xlNone
Range("C18:C" & Dl).Interior.ColorIndex = xlNone
With Range("I18:I" & Dl).Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
End With
With Range("J18:J" & Dl).Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
End With
With Range("K18:K" & Dl).Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
End With
With Range("L18:L" & Dl).Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
End With
With Range("M18:M" & Dl).Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
End With
With Range("P18:P" & Dl).Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
End With
For n = 7 To 10
Range("C18:M" & Dl).Borders(n).Weight = xlMedium
Range("O18:O" & Dl).Borders(n).Weight = xlMedium
Next
End If
End If
End Select
End If
End Sub