F
fortbelin
Guest
Bonjour à toutes et à tous.
J'ai deux vba qui fonctionne bien dans deux classeurS différents mais quand je veux les mettre dans le même classeur, elle ne marche plus. Merci pour votre aide
Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
If Not Intersect(Target, Range("I4:AE4,I14:AE14")) Is Nothing Then
With Target.Interior
If .Pattern = xlUp Then
.Pattern = xlNone
Else
.PatternColorIndex = 44
.Pattern = xlUp
End If
End With
End If
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
If Not Application.Intersect(Target, Range("J6:L6")) Is Nothing Then
With Target
If Selection.Interior.ColorIndex = 48 Then
Selection.Interior.ColorIndex = xlNone
Else
Selection.Interior.ColorIndex = 48
End If
End With
End If
End Sub
fortbelin
Utilisateur occasionnel
Messages: 23
Inscription: 23 Sep 2011, 17:12
Version Excel: 2003
J'ai deux vba qui fonctionne bien dans deux classeurS différents mais quand je veux les mettre dans le même classeur, elle ne marche plus. Merci pour votre aide
Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
If Not Intersect(Target, Range("I4:AE4,I14:AE14")) Is Nothing Then
With Target.Interior
If .Pattern = xlUp Then
.Pattern = xlNone
Else
.PatternColorIndex = 44
.Pattern = xlUp
End If
End With
End If
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
If Not Application.Intersect(Target, Range("J6:L6")) Is Nothing Then
With Target
If Selection.Interior.ColorIndex = 48 Then
Selection.Interior.ColorIndex = xlNone
Else
Selection.Interior.ColorIndex = 48
End If
End With
End If
End Sub
fortbelin
Utilisateur occasionnel
Messages: 23
Inscription: 23 Sep 2011, 17:12
Version Excel: 2003