Ayuda
Necesito el Código para validar un Textbox en visual basic, que unicamente me deje introducir letras y numeros no. y en otro textbox que solo admita numeros y letras no. Si alguien sabe como o tiene el Código fuente Por favor escribirme a: luigui_orange@hotmail.com. se los agradeceria mucho. byee
.
-
-
Curso Superior de Escaparatismo y Visual MerchandisingMasterd Davante Cursos
te envio esta codificacion de mi cuaderno de notas espero que te sirva 17. VALIDAR UN TEXTO PARA QUE UNICAMENTE INGRESE NUMERO (Crear un texto txt01) Private Sub Txt01_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger) If Not (KeyAscii >= 48 And KeyAscii <= 57) Then MsgBox prompt:="Sólo se admiten números", Buttons:=vbInformation + vbOKOnly KeyAscii = 0 End If End Sub 18. VALIDAR UN TEXTO PARA QUE UNICAMENTE INGRESE LETRAS MAYUSCULAS Y MINUSCULAS INCLUYENDO Ñ (209) ñ (241) Y EL ESPACIO (32) Private Sub Txt02_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger) If Not ((KeyAscii >= 64 And KeyAscii <= 90) Or (KeyAscii > 96 And _ KeyAscii < 125) Or KeyAscii = 32 Or KeyAscii = 241 Or KeyAscii = 209) Then MsgBox prompt:="Sólo se admiten letras", Buttons:=vbInformation + vbOKOnly KeyAscii = 0 End If End Sub