I use this one a lot, I use the tag property for the filtering.<br>
The Val("12,2"

is to find out what the decimal point is comma or a period intead of using an API to find the locale.<br>
<br>
Function filtext(KeyAscii As Integer, tag As String) As Integer<br>
Dim txt As String<br>
Dim nut As String<br>
Dim datf As String<br>
Dim telf As String<br>
datf = "1234567890/-"<br>
If Val("12,2"

= 12 Then<br>
nut = "1234567890,-"<br>
Else<br>
nut = "1234567890.-"<br>
End If<br>
telf = "1234567890/-() "<br>
txt = "abcdefghijklmnopqrstuvwxyz ABCDEFGHI'JKLMNOPQRSTUVWXYZÑñáéíóú"<br>
filtext = KeyAscii<br>
If tag = "a" Then<br>
If InStr(1, txt, Chr(KeyAscii)) > 0 Then filtext = KeyAscii Else filtext = 0<br>
ElseIf tag = "n" Then<br>
If InStr(1, nut, Chr(KeyAscii)) > 0 Then filtext = KeyAscii Else filtext = 0<br>
ElseIf tag = "t" Then<br>
If InStr(1, telf, Chr(KeyAscii)) > 0 Then filtext = KeyAscii Else filtext = 0<br>
ElseIf tag = "d" Then<br>
If InStr(1, datf, Chr(KeyAscii)) > 0 Then filtext = KeyAscii Else filtext = 0<br>
ElseIf Left(tag, 1) = "s" Then<br>
If InStr(1, tag, Chr(KeyAscii)) > 0 Then filtext = KeyAscii Else filtext = 0<br>
End If<br>
If KeyAscii = 8 Or KeyAscii = 9 Then filtext = KeyAscii<br>
End Function<br>