Featured Replies
Archivado
Este tema está ahora archivado y está cerrado a más respuestas.
A better way to browse. Learn more.
A full-screen app on your home screen with push notifications, badges and more.
Este tema está ahora archivado y está cerrado a más respuestas.
Con la siguiente macro oculto todas las celdas en blanco y al final debería de volver a bloquear pero no lo hace , cual puede ser el error
Gracias
Sub Desbloquear()
Sheets("Peticion_Ensayos_TALLER").Select 'Selecciona la Hoja1
ActiveSheet.Unprotect 'Desprotege la hoja activa. Sin contraseña
End Sub
Public Sub OcultarLineasVaciasPeticionEnsayos_TALLER()
Desbloquear
Dim rng As Range
Dim intLastCol As Integer
Dim intLastRow As Integer
Dim blnEmptyRow As Boolean
Dim i As Integer
Dim j As Integer
Set rng = Selection.SpecialCells(xlCellTypeLastCell)
intLastCol = rng.Column
intLastRow = rng.Row
For i = 1 To intLastRow
blnEmptyRow = True
For j = 1 To intLastCol
If Cells(i, j).Value <> "" Then
blnEmptyRow = False
Exit For
End If
Next
If blnEmptyRow Then
Cells(i, j).EntireRow.Hidden = True
End If
Next
End Sub
Sub Protejer()
Sheets("Peticion_Ensayos_TALLER").Select 'Selecciona la Hoja1
ActiveSheet.Protect 'Protege la hoja activa.
End Sub