Private Sub TextBox1_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
Select Case KeyAscii
Case Asc("0") To Asc("99")
Case Asc("."), Asc(",")
If InStr(1, TextBox1.Text, ".") > 0 Or InStr(1, TextBox1.Text, ",") > 0 Then
KeyAscii = 0
End If
Case Else
KeyAscii = 0
End Select
End Sub