Select Case KeyAscii
Case Is < 32 '-wont accept space " "
Case Asc("0") To Asc("9") '-accept 0 to 9
Case KeyAscii = 8 '-accept backspace
Case Asc("-")
If InStr(1, txtAmount.Text, "-") > 0 Or txtAmount.SelStart > 0 Then
KeyAscii = 0
End If
Case Asc(".")
If InStr(1, txtAmount.Text, ".") > 0 Then '-wont accept 2 decimal
KeyAscii = 0
End If
Case Else
KeyAscii = 0
End Select