NumberFormat
Résolu/Fermé
Marcos Y
Messages postés
96
Date d'inscription
jeudi 23 janvier 2014
Statut
Membre
Dernière intervention
17 juillet 2022
-
7 sept. 2015 à 10:47
Marcos Y Messages postés 96 Date d'inscription jeudi 23 janvier 2014 Statut Membre Dernière intervention 17 juillet 2022 - 7 sept. 2015 à 15:01
Marcos Y Messages postés 96 Date d'inscription jeudi 23 janvier 2014 Statut Membre Dernière intervention 17 juillet 2022 - 7 sept. 2015 à 15:01
1 réponse
ThauTheme
Messages postés
1442
Date d'inscription
mardi 21 octobre 2014
Statut
Membre
Dernière intervention
29 juillet 2022
160
7 sept. 2015 à 12:08
7 sept. 2015 à 12:08
Bonjour Marcos, bonjour le forum,
Peut-être comme ça :
Peut-être comme ça :
Private Sub CommandButton1_Click()
If IsDate(TextBox1.Text) = False Then
Label4.Visible = True
Exit Sub
End If
If IsDate(TextBox2.Text) = False Then
Label5.Visible = True
Exit Sub
End If
With Range("journée_contractuelle")
.Value = TimeSerial(Hour(TextBox1.Value), Minute(TextBox1.Value), Second(TextBox1.Value))
.NumberFormat = "[h]:mm"
End With
With Range("pause_minimum")
.Value = TimeSerial(Hour(TextBox2.Value), Minute(TextBox2.Value), Second(TextBox2.Value))
.NumberFormat = "[h]:mm"
End With
Range("type_de_contrat").Value = ComboBox1.Text
UserForm1.Hide
End Sub
7 sept. 2015 à 15:01
Ton code fonctionne parfaitement. Merci pour ton aide.
A bientôt !