Bonjour,
Toujours besoin de vous. Comment peut-on savoir si une année est bissextile sans passé par un MsgBox comme ci-dessous, mais plutôt envoyer vers un Label1 qui se trouve sur un UserForm.
Merci d’avance
Cordialement
Max
Private Sub CommandButton3_Click()
If TextBox7 = "" Then MsgBox "Veuillez entrer une année SVP...": TextBox7.SetFocus: Exit Sub
If Not IsNumeric(TextBox7) Then
MsgBox "Année non valide"
With TextBox7
.Value = ""
.SetFocus
End With
Exit Sub
End If
If DateSerial(TextBox7, 2, 29) + 1 = DateSerial(TextBox7, 3, 1) Then
MsgBox "Année Bisextile !", vbInformation
Else
MsgBox "Année Non Bisextile !", vbCritical
End If
End Sub
Toujours besoin de vous. Comment peut-on savoir si une année est bissextile sans passé par un MsgBox comme ci-dessous, mais plutôt envoyer vers un Label1 qui se trouve sur un UserForm.
Merci d’avance
Cordialement
Max
Private Sub CommandButton3_Click()
If TextBox7 = "" Then MsgBox "Veuillez entrer une année SVP...": TextBox7.SetFocus: Exit Sub
If Not IsNumeric(TextBox7) Then
MsgBox "Année non valide"
With TextBox7
.Value = ""
.SetFocus
End With
Exit Sub
End If
If DateSerial(TextBox7, 2, 29) + 1 = DateSerial(TextBox7, 3, 1) Then
MsgBox "Année Bisextile !", vbInformation
Else
MsgBox "Année Non Bisextile !", vbCritical
End If
End Sub