Private Sub CmdAnnuler_Click()
Unload Me
End Sub
Private Sub CmdValider_Click()
Range("B50000").End(xlUp).Offset(1, 0).Value = TextBox1.value
Range("C50000").End(xlUp).Offset(1, 0).Value = TextBox2.Value
Range("D50000").End(xlUp).Offset(1, 0).Value = TextBox3.Value
Range("E50000").End(xlUp).Offset(1, 0).Value = TextBox4.Value
Range("F50000").End(xlUp).Offset(1, 0).Value = TextBox5.Value
Range("G50000").End(xlUp).Offset(1, 0).Value = TextBox6.Value
Range("H50000").End(xlUp).Offset(1, 0).Value = TextBox7.Value
Range("I50000").End(xlUp).Offset(1, 0).Value = TextBox8.Value
Range("J50000").End(xlUp).Offset(1, 0).Value = TextBox10.Value
Range("K50000").End(xlUp).Offset(1, 0).Value = TextBox11.Value
Range("L50000").End(xlUp).Offset(1, 0).Value = TextBox12.Value
Range("M50000").End(xlUp).Offset(1, 0).Value = TextBox13.Value
Range("N50000").End(xlUp).Offset(1, 0).Value = TextBox14.Value
Range("O50000").End(xlUp).Offset(1, 0).Value = TextBox9.Value
Range("P50000").End(xlUp).Offset(1, 0).Value = TextBox15.Value
Range("S50000").End(xlUp).Offset(1, 0).Value = TextBox16.Value
Range("Q50000").End(xlUp).Offset(1, 0).Value = ComboBox1.Value
Range("R50000").End(xlUp).Offset(1, 0).Value = ComboBox2.Value
' Fonction
RemplacePointParVirgule
End Sub
Private Sub TextBox1_Change()
TextBox1.Value = Format(Now, "dd/mm/yyyy")
' Fonction
'Ps = C'est une date pas besoin a voir !
RemplacePointParVirgule
End Sub
Private Sub ComboBox1_Change()
If ComboBox1 = "Cornettos" Then
TextBox3.Value = TextBox2.Value * (45 / 100)
TextBox4.Value = TextBox2.Value * (22.7 / 100)
TextBox5.Value = TextBox2.Value * (11.3 / 100)
TextBox6.Value = TextBox2.Value * (3.24 / 100)
TextBox7.Value = TextBox2.Value * (10.5 / 100)
TextBox8.Value = TextBox2.Value * (1.46 / 100)
TextBox10.Value = TextBox2.Value * (0.42 / 100)
TextBox11.Value = TextBox2.Value * (0.39 / 100)
TextBox12.Value = TextBox2.Value * (0.26 / 100)
TextBox13.Value = TextBox2.Value * (2.6 / 100)
TextBox14.Value = TextBox2.Value * (2.6 / 100)
TextBox9.Value = TextBox2.Value * (0.6 / 100)
TextBox15.Value = TextBox2.Value * (0.2 / 100)
End If
If ComboBox1 = "Tuiles" Then
TextBox3.Value = TextBox2.Value * (45 / 100)
TextBox4.Value = TextBox2.Value * (22.7 / 100)
TextBox5.Value = TextBox2.Value * (11.3 / 100)
TextBox6.Value = TextBox2.Value * (3.24 / 100)
TextBox7.Value = TextBox2.Value * (10.5 / 100)
TextBox8.Value = TextBox2.Value * (1.46 / 100)
TextBox10.Value = TextBox2.Value * (0.42 / 100)
TextBox11.Value = TextBox2.Value * (0.39 / 100)
TextBox12.Value = TextBox2.Value * (0.26 / 100)
TextBox13.Value = TextBox2.Value * (2.6 / 100)
TextBox14.Value = TextBox2.Value * (2.6 / 100)
TextBox9.Value = TextBox2.Value * (0.6 / 100)
TextBox15.Value = TextBox2.Value * (0.2 / 100)
End If
If ComboBox1 = "Frites" Then
TextBox3.Value = TextBox2.Value * (50 / 100)
TextBox4.Value = TextBox2.Value * (20 / 100)
TextBox5.Value = TextBox2.Value * (10 / 100)
TextBox6.Value = TextBox2.Value * (3 / 100)
TextBox7.Value = TextBox2.Value * (10 / 100)
TextBox8.Value = TextBox2.Value * (1.5 / 100)
TextBox10.Value = TextBox2.Value * (0.5 / 100)
TextBox11.Value = TextBox2.Value * (0.5 / 100)
TextBox12.Value = TextBox2.Value * (0.3 / 100)
TextBox13.Value = TextBox2.Value * (2.5 / 100)
TextBox14.Value = TextBox2.Value * (2.5 / 100)
TextBox9.Value = TextBox2.Value * (0.5 / 100)
TextBox15.Value = TextBox2.Value * (0.2 / 100)
' Fonction
RemplacePointParVirgule
End If
End Sub
sub RemplacePointParVirgule()
Dim cCont As Control
For Each cCont In Me.Controls
If TypeName(cCont) = "TextBox" Then
' Val(Replace(Me.Controls("TextBox" & i), ",", "."))
Val(Replace(cCont.Value, ",", "."))
end if
Next cCont
End Sub