bonjour a tous
quel serai l adaptation du code ci dessous pour le mêttre sur un boutons ?
Private Sub Worksheet_Change(ByVal Target As Range)
Dim i&
If Not Intersect(Target, Range("D8:BB50")) Is Nothing Then
With Sheets("Feuil2")
For j = 7 To .Range("IV5").End(xlToLeft).Column
If .Cells(5, j).Value = "1" And .Cells(5, j + 1).Value <> "1" And .Cells(5, j + 2).Value = "1" Then
MsgBox "Il y a une rupture dans la chaine : " & .Cells(5, 2).Value
Exit Sub
End If
Next j
End With
End If
End Sub
quand j éssaye il me donnde une erreur 424 ?
merci A+
quel serai l adaptation du code ci dessous pour le mêttre sur un boutons ?
Private Sub Worksheet_Change(ByVal Target As Range)
Dim i&
If Not Intersect(Target, Range("D8:BB50")) Is Nothing Then
With Sheets("Feuil2")
For j = 7 To .Range("IV5").End(xlToLeft).Column
If .Cells(5, j).Value = "1" And .Cells(5, j + 1).Value <> "1" And .Cells(5, j + 2).Value = "1" Then
MsgBox "Il y a une rupture dans la chaine : " & .Cells(5, 2).Value
Exit Sub
End If
Next j
End With
End If
End Sub
quand j éssaye il me donnde une erreur 424 ?
merci A+