Ver Mensaje Individual
  #2 (permalink)  
Antiguo 08/03/2011, 15:57
Avatar de culd
culd
 
Fecha de Ingreso: noviembre-2003
Mensajes: 959
Antigüedad: 20 años, 5 meses
Puntos: 19
Respuesta: Volver a realizare una funcion

Lo llamas con

Call BLABLA

Código vb:
Ver original
  1. Private Sub BLABLA()
  2.     If Trim(cmbdesc) = "" Then GoTo Nodescuento
  3.  
  4.     If Trim(txtcant) = "" Then
  5.     txtcant = "1"
  6.     End If
  7.     If lblprec = "0" Then
  8.     lblprec = Val(txtprecio) * Val(txtcant)
  9.     lbldesc = Val(cmbdesc) / 100 * Val(lblprec)
  10.     lblrest = Val(lblprec) - Val(lbldesc)
  11.     lblttotal = Val(lblprec) - Val(cmbdesc) / 100 * Val(lblprec)
  12.    
  13.     End If
  14.  
  15.     If Not Trim(txtrecv) = "" Then
  16.     lbldev = Val(txtrecv) - Val(lblprec) + Val(lbldesc)
  17.     End If
  18. Nodescuento:
  19.  
  20.     If Trim(txtcant) = "" Then
  21.     txtcant = "1"
  22.     End If
  23.     If lblprec = "0" Then
  24.     lblprec = Val(txtprecio) * Val(txtcant)
  25.     lblttotal = Val(txtrecv) - Val(lblprec)
  26.     End If
  27.    
  28.     If Not Trim(txtrecv) = "" Then
  29.     lbldev = Val(txtrecv) - Val(lblprec)
  30.     End If
  31. End Sub