Si cellules sont vides
Résolu
jean300
Messages postés
382
Statut
Membre
-
jean300 Messages postés 382 Statut Membre -
jean300 Messages postés 382 Statut Membre -
Bonjour,
Je fais ce code qui ne fonctionne pas, pouvez-vous e corriger svp
En vous remerciant
Je fais ce code qui ne fonctionne pas, pouvez-vous e corriger svp
En vous remerciant
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
If Range("b10") = 0 Or Range("c10") = 0 Or Range("b11") = 0 Or Range("c11") = 0 Or Range("b12") = 0 Or Range("c12") = 0 Then
MsgBox "Vous devez inscrire au moins 3 noms"
Application.EnableEvents = True
End If
End Sub
5 réponses
-
Bonjour
Teste comme ceciPrivate Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
If Application.WorksheetFunction.CountBlank(Range("B10:C12")) > 3 Then
MsgBox "Vous devez inscrire au moins 3 noms"
End If
Application.EnableEvents = True
End Sub -
Bonjour M-12
De nouveau je te remercie, c'est impeccable
Bonne journée -
Re
Petit problème, à l'ouverture du classeur, après le mot de passe, le Msgbox apparaît ...? -
Re,
J'ai pas vu de mot de passe, mais teste avec ceciPrivate Sub Worksheet_Change(ByVal Target As Range)
If Not Application.Intersect(Target, Range("B10:C12")) Is Nothing Then
Application.EnableEvents = False
If Application.WorksheetFunction.CountBlank(Range("B10:C12")) > 3 Then
MsgBox "Vous devez inscrire au moins 3 noms"
End If
Application.EnableEvents = True
End If
End Sub -
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question -