H o l a:
Con este evento se calcula el remanente:
'
Private Sub PAGO_Exit(ByVal Cancel As MSForms.ReturnBoolean)
If IsNumeric(DEUDA) And DEUDA <> "" And IsNumeric(PAGO) And PAGO <> "" Then
REMANENTE = CDbl(DEUDA) - CDbl(PAGO)
End If
End Sub
Con este evento se calcula el total de la deuda:
Private Sub ComboBox1_Change()
'Act.Por.Dante Amor
NOMBRES = ""
APELLIDOS = ""
If ComboBox1 = "" Then Exit Sub
If ComboBox1.ListIndex = -1 Then Exit Sub
f = ComboBox1.ListIndex + 2
Set h2 = Sheets("DEUDAS CLIENTES")
NOMBRES = h2.Cells(f, "C")
APELLIDOS = h2.Cells(f, "D")
'
Set r = h2.Columns("B")
Set b = r.Find(ComboBox1, lookat:=xlWhole)
If Not b Is Nothing Then
ncell = b.Address
Do
'detalle
wtot = wtot + h2.Cells(b.Row, "E")
Set b = r.FindNext(b)
Loop While Not b Is Nothing And b.Address <> ncell
End If
'
'Set h3 = Sheets("PAGO DEUDA CLIENTE")
'Set r = h3.Columns("B")
'Set b = r.Find(ComboBox1, lookat:=xlWhole)
'If Not b Is Nothing Then
' ncell = b.Address
' Do
' 'detalle
' wpag = wpga + h3.Cells(b.Row, "F")
' Set b = r.FindNext(b)
' Loop While Not b Is Nothing And b.Address <> ncell
'End If
'DEUDA = wtot - wpag
DEUDA = wtot
End Sub