Pb de conversion

soyezd Messages postés 1 Date d'inscription jeudi 12 mai 2005 Statut Membre Dernière intervention 3 juin 2005 - 3 juin 2005 à 13:20
cs_ITALIA Messages postés 2169 Date d'inscription vendredi 20 avril 2001 Statut Membre Dernière intervention 30 juin 2009 - 3 juin 2005 à 13:34
SOUS VISUAL BASIC
voila j'ai un text1.text avec une string dedans style 14,25 comment convertir cette derniere en value numerique pour avoir 14.25 ?

Merci de votre aide

2 réponses

jpleroisse Messages postés 1788 Date d'inscription mardi 7 novembre 2000 Statut Membre Dernière intervention 11 mars 2006 27
3 juin 2005 à 13:28
Bonjour,



Private Sub Text1_Change()

Dim Str1

Str1 = Text1

If IsNumeric("0.1") Then

Text1 = CDbl(Replace(Str1, ",", "."))

End If

End Sub



jpleroisse
0
cs_ITALIA Messages postés 2169 Date d'inscription vendredi 20 avril 2001 Statut Membre Dernière intervention 30 juin 2009 9
3 juin 2005 à 13:34
Valeur = Val(Replace(Text1.Text, ",", "."))
0
Rejoignez-nous