Lisa
Sub DeleteUnlockedCells()
Dim rngeCell As Range
Application.ScreenUpdating = False
For Each rngeCell In ActiveSheet.UsedRange.Cells
If rngeCell.Locked = False Then rngeCell.ClearContents
Next
Application.ScreenUpdating = True
End Sub
Gord Dibben Excel MVP
On Thu, 17 Feb 2005 13:45:01 -0800, "Lisa"
wrote:
I am helping a co worker with a form that is used every day. It has formulas
in it and I am locking those cells and protecting the sheet to prevent the
form from being altered. Is there an easy way to put a button on the sheet
or toolbar that can be hit and it will clear the unprotected cell
information-thus putting it back to a blank field?
|