Bonjour tous,
Je sollicite à nouveau vos connaissances, car je souhaiterais faire apparaître une Msgbox lorsque 3 conditions sont réunies c'est à dire dans mon fichier exemple, lorsque la colonne E contient « BUP » la colonne F « Code 07 » et la colonne G « Boîtes » le « problème » étant que j’ai déjà une commande worksheet Change il faudrait donc l’imbriquer au code ci-dessous
Si ça demande trop de temps pas de soucis, je peux me débrouiller juste avec le code avec les 3 conditions...
Merci !
Private Sub worksheet_Change(ByVal Target As Range)
Dim ref As Range, txt$, com$, ret$ '$ signifie As String
If Not Intersect(Range("I3:I4000,N3:N4000"), Target) Is Nothing And Target.Count = 1 Then
Application.EnableEvents = False
Target.Offset(0, 1) = Empty
Application.EnableEvents = True
End If
Cancel = True
If Target.Column = 11 Then Call remplir(Target)
'Nom utilisateur+commentaire
Set ref = Intersect(Target, Range("P3:P4000"))
If ref Is Nothing Then Exit Sub
On Error Resume Next
txt = Environ("UserName")
For Each ref In ref
If Range("AA" & ref.Row) = "" Then
Range("AA" & ref.Row) = txt
End If
Next
End Sub