anthoYS
XLDnaute Barbatruc
Bonjour ;
Voilà le code principal :
Je veux ajouter ceci :
Mais ou le placer pour que ça fonctionne?
Merci
Voilà le code principal :
Code:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Cancel = True
With Target
If .Column = 2 Then
Cancel = True
If .Comment Is Nothing Then
.AddComment
.Comment.Shape.Width = 121.5
.Comment.Shape.Height = 29.75
End If
SendKeys "%im"
End If
If Target.Column = 4 Then
Cells(Target.Row, 4) = Date
End If
End With
End Sub
Je veux ajouter ceci :
Code:
[COLOR="DarkOrchid"]Dim c As Long, i As Long
If Intersect(Target, Union([klj], [infinite])) Is Nothing Then Exit Sub
c = Target.Interior.ColorIndex
For i = 1 To Range("couple").Count
If Range("couple").Cells(i, 1).Interior.ColorIndex = c Then
Target.Interior.ColorIndex = Range("couple").Cells(i + 1, 1).Interior.ColorIndex
Target.Font.ColorIndex = Range("couple").Cells(i + 1, 1).Font.ColorIndex
i = Range("couple").Count
Cancel = True
End If
Next i[/COLOR]
Mais ou le placer pour que ça fonctionne?
Merci