Subido por Venus Cañas

Sub Eliminar

Anuncio
Sub Eliminar_Usuarios()
Application.ScreenUpdating = False
Dim Usuario As String
'Dim CantReg As String
Usuario = Range("J1").Value
'CantReg = Range("f4").Value
With Application.ThisWorkbook.Worksheets("CONDICIONAL")
ActiveSheet.Unprotect "rasi123"
Range("B3").Select
Do While Not IsEmpty(ActiveCell)
If ActiveCell.Value = Usuario Then
Selection.EntireRow.Delete
Else
ActiveCell.Offset(1, 0).Select
End If
Loop
End With
Range("J1:K1").ClearContents
ActiveSheet.Protect "rasi123"
End Sub
Descargar