El código es el siguiente:
- Código: Seleccionar todo Expandir vistaContraer vista
Private Sub Worksheet_Change(ByVal Target As Range)
'Proteger celdas
'Por.Dam
If Not Intersect(Target, Range("A1:V70")) Is Nothing Then
Application.ScreenUpdating = False
Set Rango = Range("A1:V70")
ActiveSheet.Unprotect
For Each celda In Rango.Cells
celda.Select
If celda = "" Then
Selection.Locked = False
Selection.FormulaHidden = False
Else
Selection.Locked = True
Selection.FormulaHidden = False
End If
Next
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
Application.ScreenUpdating = False
End If
End Sub
De nuevo reitero mi agradecimiento si alguien me pudiera aclarar algo o hacer que funcione en Open Office. Gracias.