afficher MsgBox

lynyrd

XLDnaute Impliqué
Bonsoir à tous
Dans le fichier ci joint,j'aimerais qu'une MsgBox s'affiche automatiquement (sans bouton affecté à la macro)avec le texte suivant "10 agents convoqués pour le (+date en question)si 10 dates sont identiques.
dans l'exemple,si je rentre en C12 (23/11/2007)
Est-ce possible .
Merci.
 

Pièces jointes

  • affiche_MsgBox.zip
    1.8 KB · Affichages: 31

myDearFriend!

XLDnaute Barbatruc
Re : afficher MsgBox

Bonsoir lynyrd, le Forum,

Peut-être une façon de faire...

Dans le module de code de la feuille 1 :
Code:
[SIZE=2][COLOR=GRAY][B][I]DANS LE MODULE DE CODE DE LA FEUILLE[/I][/B][/COLOR]

[COLOR=NAVY]Private Sub[/COLOR] Worksheet_Change([COLOR=NAVY]ByVal[/COLOR] Target [COLOR=NAVY]As[/COLOR] Range)
[COLOR=GREEN]'myDearFriend! - www.mdf-xlpages.com[/COLOR]
[COLOR=NAVY]Dim[/COLOR] N [COLOR=NAVY]As Byte
    If Not[/COLOR] Application.Intersect(Target, Columns(3)) [COLOR=NAVY]Is Nothing Then[/COLOR]
        N = Application.CountIf(Columns(3), Target.Value)
        [COLOR=NAVY]If[/COLOR] N > 9 [COLOR=NAVY]Then[/COLOR]
            MsgBox N & " agents convoqués pour le " & Target.Value
        [COLOR=NAVY]End If
    End If
End Sub[/COLOR][/SIZE]
Cordialement,