• Viernes 29 de Marzo de 2024, 06:29

Autor Tema:  Como  (Leído 908 veces)

Bopo

  • Miembro activo
  • **
  • Mensajes: 72
    • Ver Perfil
Como
« en: Jueves 15 de Enero de 2004, 17:38 »
0
:huh: en un textbox que solo aceeptar  numeros pero no peudo borrar uno con la teclaretroceso o como se llame, el codigo para que acepte solo numeros eseste:

Sub Text1_KeyPress(KeyAscii As Integer)
If InStr("123456789", Chr(KeyAscii)) = 0 Then
KeyAscii = 0
End If
End Sub

pero como le pongo que oueda borrar tb? :P

Brroz

  • Miembro de PLATA
  • *****
  • Mensajes: 1058
    • Ver Perfil
Re: Como
« Respuesta #1 en: Jueves 15 de Enero de 2004, 17:51 »
0
Hola Bopo.

Sub Text1_KeyPress(KeyAscii As Integer)
If InStr("123456789", Chr(KeyAscii)) = 0 and KeyAscii <> 8 Then
KeyAscii = 0
End If
End Sub

Abur.

Bopo

  • Miembro activo
  • **
  • Mensajes: 72
    • Ver Perfil
Re: Como
« Respuesta #2 en: Jueves 15 de Enero de 2004, 17:55 »
0
Cita de: "Brroz"
Hola Bopo.

Sub Text1_KeyPress(KeyAscii As Integer)
If InStr("123456789", Chr(KeyAscii)) = 0 and KeyAscii <> 8 Then
KeyAscii = 0
End If
End Sub

Abur.
Gracias ;)