Making a template with reset button

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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?
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top