Creo q en la propiedad DataFormat, o Format algo de eso ahi puedes elegir el formato q quieras q acepte el txt creo.. no quiero equivocarme..pero creo q es asi.
sub text1_keypress(keyascii as integer) if not isnumeric(chr(keyascii)) then if keyascii<>8 then keyascii=0 endif endif end sub
Convertir números, y la coma
Código:
sub text1_keypress(keyascii as integer) if not isnumeric(chr(keyascii)) then if keyascii=asc(".") then keyascii=asc(",") endif if keyascii<>asc(",") then if keyascii<>8 then exit sub endif endif end sub
Aceptar solo letras y convertirlas a mayúsculas
Código:
sub text1_keypress(keyascii as integer) keyascii=asc(ucase(chr(keyascii))) if keyascii<asc("A") or keyascii>asc("Z") then if keyascii<>asc("Ñ") then if keyascii<>8 then keyascii=0 endif endif endif end sub
Un saludo
« Última modificación: 07 Octubre 2006, 21:16 por soplo »