keilah
04-02-2008, 06:04 AM
Public Sub Lock_Blanks()
Dim objCell As Range
ActiveSheet.Unprotect ""
On Error Resume Next
ActiveSheet.UsedRange.SpecialCells(xlCellTypeConstants).Locked = True
ActiveSheet.UsedRange.SpecialCells(xlCellTypeFormulas).Locked = True
On Error GoTo 0
ActiveSheet.Protect ""
End Sub
Hi experts
i cannot amend the above to lock blank cells only any pointer for the non VBa person.
thanks
Dim objCell As Range
ActiveSheet.Unprotect ""
On Error Resume Next
ActiveSheet.UsedRange.SpecialCells(xlCellTypeConstants).Locked = True
ActiveSheet.UsedRange.SpecialCells(xlCellTypeFormulas).Locked = True
On Error GoTo 0
ActiveSheet.Protect ""
End Sub
Hi experts
i cannot amend the above to lock blank cells only any pointer for the non VBa person.
thanks