Saludos Profesor Sergio, de ante mano gracias por responder, realice lo que me sugirió coloque el código donde me indicó, sin embargo me sigue arrojando el mismo error.
' Restaurar formato de fuente
With wsHistorico.Rows("2:2").Font
.ColorIndex = xlAutomatic
.TintAndShade = 0
End With
' Incrementar automáticamente el número de recibo
wsRecibo.Range("J2").Value = wsRecibo.Range("J2").Value + 1
'Corrección de Error en impresión
Application.Wait (Now + TimeValue("0:00:01"))
' Imprimir
wsRecibo.PrintOut Copies:=1, Collate:=True, IgnorePrintAreas:=False
Por
dorgelis, · publicado
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