RE:validar campos numericos
En tu modulo podrias porner esto:
Numeros:
Public Function Numeros(ByVal KeyAscii As Integer) As Integer
If InStr("0123456789.-", Chr(KeyAscii)) = 0 Then
Numeros = 0
Else
Numeros = KeyAscii
End If
If KeyAscii = 8 Then NumerosDecimales = KeyAscii ' borrado atras
If KeyAscii = 13 Then NumerosDecimales = KeyAscii ' return
End Function
Letras:
Public Function SoloLetras(ByVal KeyAscii As Integer) As Integer
If InStr("abcdefghijklmnñopqrstuvwxyzABCDEFGHIJKLMNÑOPQRSTUVWXYZ", Chr(KeyAscii)) = 0 Then
SoloLetras = 0
Else
SoloLetras = KeyAscii
End If
If KeyAscii = 8 Then NumerosDecimales = KeyAscii ' borrado atras
If KeyAscii = 13 Then NumerosDecimales = KeyAscii ' return
End Function
Y en el evento Keypress del TextBox:
KeyAscii=SoloLetras(Keyascii)