Bonsoir,
J'utilise ce code pour imposer la saisie d'une date ou rien dans un textbox.
Je voudrai ajouter une condition supplémentaire, à savoir la date doit
obligatoirement correspondre à un Lundi.
J'ai ajouté une ligne If Weekday(DateDebut.... mais ça ne marche pas...
Private Sub DateDebut_Exit(ByVal Cancel As MSForms.ReturnBoolean)
If Me.DateDebut.Value = "" Then Exit Sub Else
If IsDate(DateDebut.Value) Then Exit Sub Else
If Weekday(DateDebut.Value) = vbMonday Then Exit Sub Else 'ca ne marche
pas
Cette action est irreversible, confirmez la suppression du commentaire ?
Signaler le commentaire
Veuillez sélectionner un problème
Nudité
Violence
Harcèlement
Fraude
Vente illégale
Discours haineux
Terrorisme
Autre
isabelle
bonjour Domi,
If Application.Weekday(DateDebut.Value, 2) = 1 Then Exit Sub
isabelle
Bonsoir, J'utilise ce code pour imposer la saisie d'une date ou rien dans un textbox. Je voudrai ajouter une condition supplémentaire, à savoir la date doit obligatoirement correspondre à un Lundi. J'ai ajouté une ligne If Weekday(DateDebut.... mais ça ne marche pas...
Private Sub DateDebut_Exit(ByVal Cancel As MSForms.ReturnBoolean) If Me.DateDebut.Value = "" Then Exit Sub Else If IsDate(DateDebut.Value) Then Exit Sub Else
If Weekday(DateDebut.Value) = vbMonday Then Exit Sub Else 'ca ne marche pas
MsgBox "Date non valide" Cancel = True End Sub
Merci pour votre aide Domi
bonjour Domi,
If Application.Weekday(DateDebut.Value, 2) = 1 Then Exit Sub
isabelle
Bonsoir,
J'utilise ce code pour imposer la saisie d'une date ou rien dans un textbox.
Je voudrai ajouter une condition supplémentaire, à savoir la date doit
obligatoirement correspondre à un Lundi.
J'ai ajouté une ligne If Weekday(DateDebut.... mais ça ne marche pas...
Private Sub DateDebut_Exit(ByVal Cancel As MSForms.ReturnBoolean)
If Me.DateDebut.Value = "" Then Exit Sub Else
If IsDate(DateDebut.Value) Then Exit Sub Else
If Weekday(DateDebut.Value) = vbMonday Then Exit Sub Else 'ca ne marche
pas
If Application.Weekday(DateDebut.Value, 2) = 1 Then Exit Sub
isabelle
Bonsoir, J'utilise ce code pour imposer la saisie d'une date ou rien dans un textbox. Je voudrai ajouter une condition supplémentaire, à savoir la date doit obligatoirement correspondre à un Lundi. J'ai ajouté une ligne If Weekday(DateDebut.... mais ça ne marche pas...
Private Sub DateDebut_Exit(ByVal Cancel As MSForms.ReturnBoolean) If Me.DateDebut.Value = "" Then Exit Sub Else If IsDate(DateDebut.Value) Then Exit Sub Else
If Weekday(DateDebut.Value) = vbMonday Then Exit Sub Else 'ca ne marche pas
MsgBox "Date non valide" Cancel = True End Sub
Merci pour votre aide Domi
isabelle
oups,
If Application.Weekday(DateDebut.Value, 2) <> 1 Then Exit Sub
isabelle
bonjour Domi,
If Application.Weekday(DateDebut.Value, 2) = 1 Then Exit Sub
isabelle
Bonsoir, J'utilise ce code pour imposer la saisie d'une date ou rien dans un textbox. Je voudrai ajouter une condition supplémentaire, à savoir la date doit obligatoirement correspondre à un Lundi. J'ai ajouté une ligne If Weekday(DateDebut.... mais ça ne marche pas...
Private Sub DateDebut_Exit(ByVal Cancel As MSForms.ReturnBoolean) If Me.DateDebut.Value = "" Then Exit Sub Else If IsDate(DateDebut.Value) Then Exit Sub Else
If Weekday(DateDebut.Value) = vbMonday Then Exit Sub Else 'ca ne marche pas
MsgBox "Date non valide" Cancel = True End Sub
Merci pour votre aide Domi
oups,
If Application.Weekday(DateDebut.Value, 2) <> 1 Then Exit Sub
isabelle
bonjour Domi,
If Application.Weekday(DateDebut.Value, 2) = 1 Then Exit Sub
isabelle
Bonsoir,
J'utilise ce code pour imposer la saisie d'une date ou rien dans un
textbox.
Je voudrai ajouter une condition supplémentaire, à savoir la date doit
obligatoirement correspondre à un Lundi.
J'ai ajouté une ligne If Weekday(DateDebut.... mais ça ne marche pas...
Private Sub DateDebut_Exit(ByVal Cancel As MSForms.ReturnBoolean)
If Me.DateDebut.Value = "" Then Exit Sub Else
If IsDate(DateDebut.Value) Then Exit Sub Else
If Weekday(DateDebut.Value) = vbMonday Then Exit Sub Else 'ca ne
marche
pas
If Application.Weekday(DateDebut.Value, 2) <> 1 Then Exit Sub
isabelle
bonjour Domi,
If Application.Weekday(DateDebut.Value, 2) = 1 Then Exit Sub
isabelle
Bonsoir, J'utilise ce code pour imposer la saisie d'une date ou rien dans un textbox. Je voudrai ajouter une condition supplémentaire, à savoir la date doit obligatoirement correspondre à un Lundi. J'ai ajouté une ligne If Weekday(DateDebut.... mais ça ne marche pas...
Private Sub DateDebut_Exit(ByVal Cancel As MSForms.ReturnBoolean) If Me.DateDebut.Value = "" Then Exit Sub Else If IsDate(DateDebut.Value) Then Exit Sub Else
If Weekday(DateDebut.Value) = vbMonday Then Exit Sub Else 'ca ne marche pas
MsgBox "Date non valide" Cancel = True End Sub
Merci pour votre aide Domi
Domi
Merci ;o) Domi
"isabelle" a écrit dans le message de news:
oups,
If Application.Weekday(DateDebut.Value, 2) <> 1 Then Exit Sub
isabelle
bonjour Domi,
If Application.Weekday(DateDebut.Value, 2) = 1 Then Exit Sub
isabelle
Bonsoir, J'utilise ce code pour imposer la saisie d'une date ou rien dans un textbox. Je voudrai ajouter une condition supplémentaire, à savoir la date doit obligatoirement correspondre à un Lundi. J'ai ajouté une ligne If Weekday(DateDebut.... mais ça ne marche pas...
Private Sub DateDebut_Exit(ByVal Cancel As MSForms.ReturnBoolean) If Me.DateDebut.Value = "" Then Exit Sub Else If IsDate(DateDebut.Value) Then Exit Sub Else
If Weekday(DateDebut.Value) = vbMonday Then Exit Sub Else 'ca ne marche pas
MsgBox "Date non valide" Cancel = True End Sub
Merci pour votre aide Domi
Merci ;o)
Domi
"isabelle" <hoHoho@hohoHo> a écrit dans le message de
news:efexLAEeGHA.1208@TK2MSFTNGP02.phx.gbl...
oups,
If Application.Weekday(DateDebut.Value, 2) <> 1 Then Exit Sub
isabelle
bonjour Domi,
If Application.Weekday(DateDebut.Value, 2) = 1 Then Exit Sub
isabelle
Bonsoir,
J'utilise ce code pour imposer la saisie d'une date ou rien dans un
textbox.
Je voudrai ajouter une condition supplémentaire, à savoir la date doit
obligatoirement correspondre à un Lundi.
J'ai ajouté une ligne If Weekday(DateDebut.... mais ça ne marche pas...
Private Sub DateDebut_Exit(ByVal Cancel As MSForms.ReturnBoolean)
If Me.DateDebut.Value = "" Then Exit Sub Else
If IsDate(DateDebut.Value) Then Exit Sub Else
If Weekday(DateDebut.Value) = vbMonday Then Exit Sub Else 'ca ne
marche
pas
If Application.Weekday(DateDebut.Value, 2) <> 1 Then Exit Sub
isabelle
bonjour Domi,
If Application.Weekday(DateDebut.Value, 2) = 1 Then Exit Sub
isabelle
Bonsoir, J'utilise ce code pour imposer la saisie d'une date ou rien dans un textbox. Je voudrai ajouter une condition supplémentaire, à savoir la date doit obligatoirement correspondre à un Lundi. J'ai ajouté une ligne If Weekday(DateDebut.... mais ça ne marche pas...
Private Sub DateDebut_Exit(ByVal Cancel As MSForms.ReturnBoolean) If Me.DateDebut.Value = "" Then Exit Sub Else If IsDate(DateDebut.Value) Then Exit Sub Else
If Weekday(DateDebut.Value) = vbMonday Then Exit Sub Else 'ca ne marche pas