1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
|
Private Sub CommandButton1_Click()
TextBox1.Value = Replace(TextBox1.Value, ".", ",")
TextBox2.Value = Replace(TextBox2.Value, ".", ",")
TextBox3.Value = Replace(TextBox3.Value, ".", ",")
TextBox4.Value = Replace(TextBox4.Value, ".", ",")
TextBox5.Value = Replace(TextBox5.Value, ".", ",")
If TextBox1 <> "" Then
val1 = Format(TextBox1.Value, "#,##0.00") * 1
End If
If TextBox2 <> "" Then
val2 = Format(TextBox2.Value, "#,##0.00") * 1
End If
If TextBox3 <> "" Then
val3 = Format(TextBox3.Value, "#,##0.00") * 1
End If
If TextBox4 <> "" Then
val4 = Format(TextBox4.Value, "#,##0.00") * 1
End If
If TextBox5 <> "" Then
val5 = Format(TextBox5.Value, "#,##0.00") * 1
End If
total = val1 + val2 + val3 + val4 + val5
TextBox8.Value = Format(total, "#,##0.00") * 1
facteur1 = Format(TextBox6.Value, "#,###0.000") * 1
facteur2 = Format(TextBox7.Value, "#,###0.000") * 1
TextBox9.Value = Format(facteur1 * total, "#,##0.00") * 1
TextBox10.Value = Format(facteur2 * total, "#,##0.00") * 1
TextBox11.Value = Format((facteur1 + facteur2) * total, "#,##0.00") * 1
End Sub |
Partager