1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
|
Private Sub worksheet_Selectionchange(ByVal Target As Range)
'============================================
'VERIFICATION DES LIGNES POUR AJOUTER LA CASE SOLDER
'============================================
Application.ScreenUpdating = False
If Not ActiveSheet.ProtectContents Then
If Not Application.Intersect(Target, Range("B:L")) Is Nothing Then
Dim i As Long
i = Sheets("signalements").Range("A" & Rows.Count).End(xlUp).Row
For lg = 3 To i
If Len(Cells(lg, 2)) = 10 And Cells(lg, 3) <> Empty And Cells(lg, 4) <> Empty And Cells(lg, 5) <> Empty And Cells(lg, 6) <> Empty And Cells(lg, 7) <> Empty And Cells(lg, 9) <> Empty And Len(Cells(lg, 11)) = 10 And Cells(lg, 12) <> Empty Then
Cells(lg, 13).Interior.ColorIndex = 8
Cells(lg, 13) = "SOLDER"
Else: Cells(lg, 13).Interior.ColorIndex = 0
Cells(lg, 13) = Empty
End If
Next
End If
If Not Application.Intersect(Target, Range("M:M")) Is Nothing Then
If Cells(ActiveCell.Row, ActiveCell.Column).Interior.ColorIndex = 8 And Cells(ActiveCell.Row, ActiveCell.Column) = "SOLDER" Then
Call Solderunsignalement
End If
End If
End If
Application.ScreenUpdating = True
End Sub |
Partager