Ver Mensaje Individual
  #2 (permalink)  
Antiguo 29/09/2006, 15:16
Avatar de tazzito
tazzito
 
Fecha de Ingreso: agosto-2006
Mensajes: 381
Antigüedad: 18 años, 9 meses
Puntos: 2
Daeli

hola para no aceptar letras numeros o viceversa te recomiendo usar el evento keypress y validarlo aca tienes mas menos un ejemplo

Function EsNumerico(pasoKeyAscii As Integer) As Integer
'Enter, Sup y Escape
If pasoKeyAscii = 13 Or pasoKeyAscii = 8 Or pasoKeyAscii = 27 Then
EsNumerico = pasoKeyAscii
Exit Function
'Compara si es Numerico
ElseIf IsNumeric(Chr(pasoKeyAscii)) Then
EsNumerico = pasoKeyAscii
Exit Function
si no pertenece a ningun otro devuelve 0 al keyascii
Else
EsNumerico = 0
End If
End Function

y para ocuparlo es asi

Private Sub txtRutValidador_KeyPress(KeyAscii As Integer)
KeyAscii = EsNumerico(KeyAscii)
If KeyAscii = 13 Then txtClaveValidador.setfocus
End Sub