Ver Mensaje Individual
  #6 (permalink)  
Antiguo 01/07/2006, 12:28
Avatar de black_devil
black_devil
 
Fecha de Ingreso: junio-2006
Mensajes: 89
Antigüedad: 18 años, 7 meses
Puntos: 1
jc_moty hola aun no puedo resolver el problema
mira tengo esto

Private Sub cmdactualizar_Click()
'total = Val(valor1) + Val(valor2) + Val(valor3) + Val(valor4) + Val(valor5) + Val(valor6) + Val(valor7) + Val(valor8)

'valor1 = Mid(txtpeajescelco, 2, Len(txtpeajescelco)) ' captamos el valor de txt1 a partir de "$"
'valor2 = Mid(txtpeajesotros, 2, Len(txtpeajesotros)) ' captamos el valor de txt2 a partir de "$"

'valor1 = Replace(valor1, ",", "") ' borramos las comas de valor1
'valor2 = Replace(valor2, ",", "") ' borramos las comas de valor 2

total = Val(valor1) + Val(valor2)
'txttotal = Format(total, "#,#0.00")

txttotal.Text = Format(total, "#,##0.00")
'no importa que aparesca el signo de dinero "$#,##0.00"
End Sub

Private Sub txtpeajescelco_Change()
valor1 = Format(txtpeajescelco.Text, "#,#0.00")
End Sub

Private Sub txtpeajescelco_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
KeyAscii = 0
SendKeys "{tab}"
valor1 = Format(txtpeajescelco.Text, "#,#0.00")
txtpeajescelco.Text = valor1
End If
End Sub

Private Sub txtpeajescelco_LostFocus()
valor1 = Format(txtpeajescelco.Text, "#,#0.00")
txtpeajescelco.Text = valor1
End Sub

Private Sub txtpeajesotros_Change()
valor2 = Format(txtpeajesotros.Text, "#,#0.00")
End Sub

Private Sub txtpeajesotros_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
KeyAscii = 0
SendKeys "{tab}"
valor2 = Format(txtpeajesotros.Text, "#,#0.00")
txtpeajesotros.Text = valor2
End If
End Sub

Private Sub txtpeajesotros_LostFocus()
valor2 = Format(txtpeajesotros.Text, "#,#0.00")' no importa el signo dinero
txtpeajesotros.Text = valor2
End Sub
Bueno en tiempo de ejecucion ingreso los datos en las respectivas cajas de texto me aparece asi:
text1
1.000,00
text2
1.000,00
pero en la suma
aparece
2,00
no suma los valores después del punto, o sea toma por defecto los valores en unidad...

ayuda, por favor