H o l a:
Te anexo la macro para borrar las multas
Private Sub CmdPagos_Click()
'Por.Dante Amor
If Lsmulta.ListCount = 0 Then
MsgBox "No hay Padres con multas"
Exit Sub
End If
'
If TxtTotal.Text = "" Then
MsgBox "No hay Padres con multas"
TextBox1.SetFocus
Exit Sub
End If
'
Set h3 = Sheets("Pagos")
u = 5
Do While h3.Cells(u, "A") <> ""
u = u + 1
Loop
dni = TextBox1
For i = 0 To Lsmulta.ListCount - 1
h3.Cells(u, "A") = CDate(Txtfecha)
h3.Cells(u, "B") = TextBox1.Text
h3.Cells(u, "C") = CboLista
h3.Cells(u, "D") = Lsmulta.List(i, 1)
h3.Cells(u, "E") = Val(Lsmulta.List(i, 2))
h3.Cells(u, "F") = Val(TxtTotal)
u = u + 1
Next
'
'Borrar multa
'
Set h2 = Sheets("Multas")
Set r = h2.Columns("C")
Set b = r.Find(dni, lookat:=xlWhole)
If Not b Is Nothing Then
ncell = b.Address
Do
'detalle
h2.Cells(b.Row, "K") = "borrar"
Set b = r.FindNext(b)
Loop While Not b Is Nothing And b.Address <> ncell
End If
For i = h2.Range("K" & Rows.Count).End(xlUp).Row To 3 Step -1
If h2.Cells(i, "K") = "borrar" Then h2.Rows(i).Delete
Next
'
CboLista = ""
MsgBox "Los Datos datos se registraron con éxito"
End Sub
sal u dos