Bonjour à tous,
Me revoilà avec un petit souci, je souhaite limiter les chiffres après la virgule,
j'ai essayé math.round et quelques autres mais rien ni fait, voici le code :
Merci pour vos réponses.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11 Private Sub resultat_Click() If Val(Text2.Text) <> 0 Then Text3 = Val(Text1.Text) / Val(Text2.Text) ^ 2 If Text3.Text > 0 And x <= 16.5 Then Text4.Text = "Dénutrition" If Text3.Text > 16.5 And x <= 18.5 Then Text4.Text = "Maigreur" If Text3.Text > 18.5 And x <= 25 Then Text4.Text = "Corpulence normale" If Text3.Text > 25 And x <= 30 Then Text4.Text = "Surpoids" If Text3.Text > 30 And x <= 35 Then Text4.Text = "Obésité modérée" If Text3.Text > 35 And x <= 100 Then Text4.Text = "Obésité morbide ou massive" End If End Sub
Séb
Partager