Re : Erreur de compilation dans un code
Bonsoir antohYS, le Forum,
Je pense qu'il te faut faire un seul code compte tenu qu'il s'agit de la même condition (double click
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Dim c As Long, i As Long
Cancel = True
If Not Application.Intersect(Target, [E3:J10]) Is Nothing Then Target.Interior.ColorIndex = IIf(Target.Interior.ColorIndex = 4, xlNone, 4)
If Target.Column = 4 Then
Cells(Target.Row, 4) = Date
End If
If Target.Column = 11 Then
Cells(Target.Row, 11) = Date
End If
If Intersect(Target, Range("Felkig")) Is Nothing Then Exit Sub
c = Target.Interior.ColorIndex
For i = 1 To Range("palette").Count
If Range("palette").Cells(i, 1).Interior.ColorIndex = c Then
Target.Interior.ColorIndex = Range("palette").Cells(i + 1, 1).Interior.ColorIndex
Target.Font.ColorIndex = Range("palette").Cells(i + 1, 1).Font.ColorIndex
i = Range("palette").Count
Cancel = True
End If
Next i
End Sub
Bonne continuation