Private Sub TextBox2_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
If KeyAscii = Asc(Point) Then
If InStr(TextBox2, Virgule) = 0 Then
KeyAscii = Asc(Virgule) & KeyAscii = 32
Else
KeyAscii = 0
End If
ElseIf InStr(entrees_decimales_permises, Chr(KeyAscii)) = 0 Then
KeyAscii = 0 & KeyAscii = 32
ElseIf InStr(TextBox2, Virgule) > 0 And KeyAscii = Asc(Virgule) Then
KeyAscii = 0 & KeyAscii = 32
End If
If KeyAscii = 13 Then SendKeys "{TAB}": KeyAscii = 0
If ComboBox9.Value = "l/s & bar" Or ComboBox9.Value = "l/s & kPa" Then
Sheets("Unité").Range("B1").Value = TextBox2.Text
Sheets("Unité").Range("B2").Value = Sheets("Unité").Range("B1").Value / 1000 * 3600
End If
If ComboBox9.Value = "m3/h & bar" Or ComboBox9.Value = "m3/h & kPa" Then
Sheets("Unité").Range("B2").Value = TextBox2.Text
Sheets("Unité").Range("B1").Value = Sheets("Unité").Range("B2").Value * 1000 / 3600
End If
End Sub