clear specific cells in a form

V

vdmbqb

Okay, I am not exactly an Excel genius. I have an Excel spreadsheet form that
is protected from editing in all cells except for the cells that require
changing each time the form is used. For instance, A1 is protected and in the
cell is the word Name and A2 is blank and unprotected so that the name can be
entered. I do have the ability to unprotect the sheet.

I am trying to come up with a way to clear the form of all the unprotected
cells after the form is filled out. I hope that makes sense.

Ron de Bruin has already sent assistance, but I think I am too stupid to
understand. I would really need something specific for me to figure it out.
Any help would be appreciated.
 
M

Mike H

One way.

Hold down the CTRL key and select each of your unprotected cell. Then:-
With all your cells still selected click
Insert|Name|define and type a name for these cell, in this case MyCells
Click OK

Right click the sheet tab, view code and paste this in and run it to clear
your range


Sub clear()
Range("mycells").ClearContents
End Sub

Mike
 

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

Top