Programación General > Visual Basic 6.0 e inferiores
Como
(1/1)
Bopo:
: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:
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:
--- 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.
--- Fin de la cita ---
Gracias ;)
Navegación
Ir a la versión completa