Bonjour toutes et tous
Sandrine13, pour tes valeurs numériques pour tes textbox 13,14 et 15 de ton userform1
EDIT : prendre les exemples ci-dessous pour ton autre userform 'Creatmodif'
à ajouter :
Private Sub TextBox13_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
If KeyAscii < 48 Or KeyAscii > 57 Then KeyAscii = 0 ' txtbox13 Total mensuel USF1 en alphanumerique uniquement
End Sub
Private Sub TextBox14_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
If KeyAscii < 48 Or KeyAscii > 57 Then KeyAscii = 0 ' txtbox14 adhesion n1 USF1 en alphanumerique uniquement
End Sub
Private Sub TextBox15_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
If KeyAscii < 48 Or KeyAscii > 57 Then KeyAscii = 0 ' txtbox15 adhesion USF1 en alphanumerique uniquement
End Sub
pour la saisie de date :
proposé par Dan
https://forum.excel-pratique.com/excel/format-date-dans-un-textbox-t19448.html
'à rajouter !!! if...
'dans ]Private Sub TextBox6_Change()
If TextBox6 <> Format(TextBox6, "dd/mm/yyyy") Then MsgBox "le format Date est incorrect !"
'End sub
'New
Private Sub TextBox8_Change()
If TextBox8 <> Format(TextBox8, "dd/mm/yyyy") Then MsgBox "le format Date est incorrect !"
End sub
'à rajouter !!!==> if textbox9...
'Private Sub TextBox9_Change()
If TextBox9 <> Format(TextBox9, "dd/mm/yyyy") Then MsgBox "le format Date est incorrect !"
'End sub
crdlt,
André