If UCase$(Chr$(KeyAscii)) Like"[A-Z]"Or UCase$(Chr$(KeyAscii)) = "Ñ"Then KeyAscii = 0
If LCase$(Chr$(KeyAscii)) = "`"Or LCase$(Chr$(KeyAscii)) = "+"Then KeyAscii = 0
If LCase$(Chr$(KeyAscii)) = "´"Or (Chr$(KeyAscii)) = "ç"Then KeyAscii = 0
If LCase$(Chr$(KeyAscii)) = "-"Or LCase$(Chr$(KeyAscii)) = "'"Then KeyAscii = 0
If LCase$(Chr$(KeyAscii)) = "¡"Or LCase$(Chr$(KeyAscii)) = "/"Then KeyAscii = 0
If LCase$(Chr$(KeyAscii)) = "*"Or LCase$(Chr$(KeyAscii)) = "º"Then KeyAscii = 0
If LCase$(Chr$(KeyAscii)) = "."Then KeyAscii = 0
endsub
ENLACE AL CODIGO
Si quieres enlazar desde tu pagina a este codigo
<!-- Inicio enlace Tutores.org -->
<a title="Tutores.org - Sólo datos númericos en campo de texto sin límites" href="http://www.tutores.org/codigo/1603/" target="_blank">Sólo datos númericos en campo de texto sin límites</a>
<!-- Final enlace Tutores.org -->
COMENTARIOS
Comentario usuario
BulachiBulachi
15
una mejora, solo todo aquello que no sea numeros y letras lo desecha en un sola linea...
If (KeyAscii >= 1 And KeyAscii <= 47) Or (KeyAscii >= 58 And KeyAscii <= 64) Or (KeyAscii >= 91 And KeyAscii <= 96) Or (KeyAscii >= 123 And KeyAscii <= 255) Then KeyAscii = 0
Comentario usuario
Sin definirSin definir
25
EL PROFE SE PASA DE LANZA CON SUS PINCHES PROGRAMAS PIENSA QE YA SABEMOS PROGRMAR EN VISUAL PERO NO...