Ver Mensaje Individual
  #4 (permalink)  
Antiguo 29/05/2011, 13:51
guillebomtrasmiti
 
Fecha de Ingreso: noviembre-2010
Ubicación: madrid
Mensajes: 478
Antigüedad: 14 años
Puntos: 5
Respuesta: no suma los decimales en textbox

arreglado, para quien le pueda servir aporto....
'aquí saco el total del iva en los textbox correspondientes
Public Sub multiplicabaseimp()
Dim total1 As Decimal = 0
total1 = CDec(CStr(Val(TextBImp18.Text) * 1.18))
TextTotal18.Text = Format(Format(total1, "##,##0.00").Replace(".", ","))

Dim total2 As Decimal = 0
total2 = CDec(CStr(Val(TextBImp8.Text) * 1.08))
TextTotal8.Text = Format(Format(total2, "##,##0.00").Replace(".", ","))

Dim total3 As Decimal = 0
total3 = CDec(CStr(Val(TextBImp4.Text) * 1.04))
TextTotal4.Text = Format(Format(total3, "##,##0.00").Replace(".", ","))

Dim total4 As Decimal = 0
total4 = CDec(CStr(Val(TextBImp2.Text) * 1.02))
TextTotal2.Text = Format(Format(total4, "##,##0.00").Replace(".", ","))


If CDbl(TextoTRDTO.Text) = 0 Then
If CDbl(TextotrImp.Text) = 0 Then
Dim total As Decimal = 0
'total = CDec((Val(TextTotal18.Text) + Val(TextTotal8.Text) + Val(TextTotal4.Text) + Val(TextTotal2.Text)))
total = total1 + total2 + total3 + total4
TextTotal.Text = Format(Format(total, "##,##0.00"))

End If
End I