Ver Mensaje Individual
  #3 (permalink)  
Antiguo 08/07/2004, 11:47
minoralberto
 
Fecha de Ingreso: julio-2004
Mensajes: 5
Antigüedad: 19 años, 10 meses
Puntos: 0
' digite el siguiente codigo en el evento 'Keypress' del text box

Const Number$ = "0123456789." ' solamente permite estos caracteres

If KeyAscii <> 8 Then
If InStr(Number$, Chr(KeyAscii)) = 0 Then
KeyAscii = 0
Exit Sub
End If
End If

OR:

' fuerza solo numeros en el text box
If IsNumeric(Chr(KeyAscii)) <> True Then KeyAscii = 0