Bonjour
pour les chiffres a virgule Voir le KeyPress dans le UserForm
Private Sub TextBox5_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
Call VirgulChiffre(KeyAscii, 5)
End Sub
Sub VirgulChiffre(KeyAscii, T As Long)
'TRANSFORMER LE POINT PAR UNE VIRGULE
If KeyAscii = 46 Then KeyAscii = 44
'ACCEPTER UNIQUEMENT UNE SEULE VIRGULE ET LES CHIFFRES ENTRE 0 ET 9
If InStr("1234567890,", Chr(KeyAscii)) = 0 Or (InStr(Controls("TextBox" & T).Value, ",") <> 0 And Chr(KeyAscii) = ",") _
Or (Controls("TextBox" & T).SelStart = 0 And Chr(KeyAscii) = ",") Then KeyAscii = 0: Beep
End Sub
et a la creation
Cells(ligne, colonne) = cdbl(TextBox5.value)
A+
Maurice