Coloration verte après un double clic, rouge après deux

anthoYS

XLDnaute Barbatruc
bonjour,

j'ai un soucis avec un code.

Code:
[COLOR="Yellow"]Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)[/COLOR]
    Dim c As Long, i As Long
    If Intersect(Target, Union([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

voir le fichier joint:confused:
 

Pièces jointes

  • ColPlr2(vr).xls
    28 KB · Affichages: 92

Discussions similaires

Statistiques des forums

Discussions
312 684
Messages
2 090 916
Membres
104 698
dernier inscrit
miespetico