Callimea
Nouveau membre
Bonjour,
Je comprends vraiment pas pourquoi j'obtiens cette erreur d'objet, j'ai beau faire des modifs, rien ne fonctionne. Mais je ne vois pas d'erreur dans l'appellation de ma variable... Et vous?
Private Sub Worksheet_Change(ByVal Target As Range)
Dim NumSE As Variant, n As Long
n = Target.Row
For x = 1 To 17
If Cells(n, 1) <> "" And Cells(n, 6) = "" Or Cells(n, 7) = "En attente" Or Cells(n, 7) = "" Or Cells(n, 9) = "" Or Cells(n, 11) = "" Then
Cells(n, x).Interior.ColorIndex = 3
End If
If Cells(n, 4) = "canceled" And Cells(n, 17) = "Validé" Then
Cells(n, x).Interior.ColorIndex = 41
End If
If Cells(n, 4) = "canceled" And Cells(n, 17) = "Validé" Then
Set NumSE = Cells(n, 6)
End If
If NumSE Is Change Then ' Lerreur ce produit sur cette ligne
For A = 9 To 100
For b = 1 To 17
If Cells(A, 6) = NumSE Then
Cells(A, b).Interior.ColorIndex = 41
End If
Next b '
Next A '
End If
Set NumSE = Nothing
Next x '
End Sub
Merci d'avance pour votre aide
Je comprends vraiment pas pourquoi j'obtiens cette erreur d'objet, j'ai beau faire des modifs, rien ne fonctionne. Mais je ne vois pas d'erreur dans l'appellation de ma variable... Et vous?
Private Sub Worksheet_Change(ByVal Target As Range)
Dim NumSE As Variant, n As Long
n = Target.Row
For x = 1 To 17
If Cells(n, 1) <> "" And Cells(n, 6) = "" Or Cells(n, 7) = "En attente" Or Cells(n, 7) = "" Or Cells(n, 9) = "" Or Cells(n, 11) = "" Then
Cells(n, x).Interior.ColorIndex = 3
End If
If Cells(n, 4) = "canceled" And Cells(n, 17) = "Validé" Then
Cells(n, x).Interior.ColorIndex = 41
End If
If Cells(n, 4) = "canceled" And Cells(n, 17) = "Validé" Then
Set NumSE = Cells(n, 6)
End If
If NumSE Is Change Then ' Lerreur ce produit sur cette ligne
For A = 9 To 100
For b = 1 To 17
If Cells(A, 6) = NumSE Then
Cells(A, b).Interior.ColorIndex = 41
End If
Next b '
Next A '
End If
Set NumSE = Nothing
Next x '
End Sub
Merci d'avance pour votre aide