Ver Mensaje Individual
  #3 (permalink)  
Antiguo 09/03/2011, 10:28
Avatar de lokoman
lokoman
 
Fecha de Ingreso: septiembre-2009
Mensajes: 502
Antigüedad: 14 años, 7 meses
Puntos: 47
Respuesta: Volver a realizare una funcion

Cita:
Iniciado por musicale Ver Mensaje
Hola a todos,
tengo esta funcion:

Código:
Private Sub cmbnombre_Click()
            
    If Trim(cmbdesc) = "" Then GoTo Nodescuento

    If Trim(txtcant) = "" Then
    txtcant = "1"
    End If
    If lblprec = "0" Then
    lblprec = Val(txtprecio) * Val(txtcant)
    lbldesc = Val(cmbdesc) / 100 * Val(lblprec)
    lblrest = Val(lblprec) - Val(lbldesc)
    lblttotal = Val(lblprec) - Val(cmbdesc) / 100 * Val(lblprec)
    
    End If

    If Not Trim(txtrecv) = "" Then
    lbldev = Val(txtrecv) - Val(lblprec) + Val(lbldesc)
    End If
Nodescuento:

    If Trim(txtcant) = "" Then
    txtcant = "1"
    End If
    If lblprec = "0" Then
    lblprec = Val(txtprecio) * Val(txtcant)
    lblttotal = Val(txtrecv) - Val(lblprec)
    End If
    
    If Not Trim(txtrecv) = "" Then
    lbldev = Val(txtrecv) - Val(lblprec)
    End If
    
End Sub
quisiera ahora tener un boton, que cuando haga click
vuelva a realizar el calculo que realizo en "cmbnombre"

como tendria que hacer?
gracias
Simplemente en el boton:
Código vb:
Ver original
  1. cmbnombre_Click