RE:ayuda con ingreso de comas en campos numericos
Holas,
Recuperando el código del amigo Arnaldo puedes solucionar lo de las comas:
Private Sub Text1_KeyPress(Index As Integer, KeyAscii As Integer)
KeyAscii = SoloNumeros(KeyAscii, Text1)
End Sub
Public Function SoloNumeros(ByVal KeyAscii As Integer, Texto as String) As Integer
Dim i as integer, CuentaComas as integer
If KeyAscii = Asc(".") Then KeyAscii = Asc(",")
If InStr("0123456789,", Chr(KeyAscii)) = 0 Then
SoloNumeros = 0
Else
if len(texto)<>0 then
For i =1 to len(Texto)
If mid(Texto, i , 1)="," then
CuentaComas=CuentaComas+1
End if
next i
End if
If CuentaComas<>0 and KeyAscii = Asc(",") then
SoloNumeros=0
Else
SoloNumeros = KeyAscii
End if
End If
' teclas especiales permitidas
If KeyAscii = 8 Then SoloNumeros = KeyAscii
If KeyAscii = 13 Then SoloNumeros = KeyAscii
End Function
Prueba con eso a ver, no se si me he colado pero creo que te servirá.
Saludos,
Javier