Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Not Application.Intersect(Target, Range("K:K")) Is Nothing And IsEmpty(Target) Then
Cells(Target.Row, 11) = Date
End If
If Not Application.Intersect(Target, Range("J:J")) Is Nothing And IsEmpty(Target) Then
Calendrier.Show
End If
Cancel = True
If Target.Column = 7 Then
Cells(Target.Row, 1).Interior.ColorIndex = 4
Cells(Target.Row, 2).Interior.ColorIndex = 4
Cells(Target.Row, 3).Interior.ColorIndex = 4
Cells(Target.Row, 4).Interior.ColorIndex = 4
Cells(Target.Row, 5).Interior.ColorIndex = 4
End If
If Target.Column = 8 Then
Cells(Target.Row, 1).Interior.ColorIndex = 15
Cells(Target.Row, 2).Interior.ColorIndex = 15
Cells(Target.Row, 3).Interior.ColorIndex = 15
Cells(Target.Row, 4).Interior.ColorIndex = 15
Cells(Target.Row, 5).Interior.ColorIndex = 15
End If
If Target.Column = 12 Then
Cells(Target.Row, 12).Interior.ColorIndex = 4
Cells(Target.Row, 12) = Date
End If
If Target.Column = 9 And Target.Count = 1 Then
'-- suppression
For Each S In ActiveSheet.Shapes
If S.Type = 8 Then
If S.TopLeftCell.Address = Target.Address Then S.Delete
End If
Next S
'--
If Target <> "" Then
On Error Resume Next
Sheets("mdP").Shapes(Target).Copy
If Err = 0 Then
ActiveSheet.Paste
largeurImage = Sheets("mdP").Shapes(Target).Width
HauteurImage = Sheets("mdP").Shapes(Target).Height
Selection.ShapeRange.Left = ActiveCell.Left + ActiveCell.Width / 2 - largeurImage / 2
Selection.ShapeRange.Top = ActiveCell.Top + 0
Rows(Target.Row).RowHeight = 39
Target.Select
End If
End If
End If
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect([I2:I10000], Target) Is Nothing Then
On Error Resume Next
Target.Interior.ColorIndex = [Navig].Find(Target, LookAt:=xlWhole).Interior.ColorIndex
Target.Font.ColorIndex = [Navig].Find(Target, LookAt:=xlWhole).Font.ColorIndex
End If
End Sub