Bonjour à tous,
J'ai un soucis pour convertir une date de la forme 11/03/2015 en mercredi 11 mars 2015
Sur certaines dates ça fonctionne mais sur d'autres non, j'ai une erreur d’exécution 9 l'indice n'appartient pas à la sélection
Voici ma programmation :
J'ai fais un petit fichier exemple
Merci par avance pour vos aides
J'ai un soucis pour convertir une date de la forme 11/03/2015 en mercredi 11 mars 2015
Sur certaines dates ça fonctionne mais sur d'autres non, j'ai une erreur d’exécution 9 l'indice n'appartient pas à la sélection
Voici ma programmation :
Code:
Private Sub TextBox1_Change()
TextBox1.MaxLength = 10 'nb caractères maxi autorisé dans le textbox
Valeur = Len(TextBox1)
If Valeur = 2 Or Valeur = 5 Then
TextBox1 = TextBox1 & "/"
End If
TextBox1.Text = UCase(TextBox1.Text)
End Sub
Private Sub CommandButton1_Click()
j = Array("", "LUNDI", "MARDI", "MERCREDI", "JEUDI", "VENDREDI", "SAMEDI", "DIMANCHE")
m = Array("", "JANVIER", "FEVRIER", "MARS", "AVRIL", "MAI", "JUIN", "JUILLET", "AOUT", "SEPTEMBRE", "OCTOBRE", "NOVEMBRE", "DECEMBRE")
TextBox2 = TextBox1.Value
TextBox2 = j(Day(TextBox1.Value)) & " " & Day(TextBox1.Value) & " " & m(Month(TextBox1.Value)) & " " & Year(TextBox1.Value)
End Sub
J'ai fais un petit fichier exemple
Merci par avance pour vos aides