excel clear button

V

vdmbqb

I have a form written in excel 2003. Every cell on the form is locked except
the cells that require new info each time. For instance, cell A1 reads NAME
and cell A2 is blank and allows you to enter a persons name. At the top of
the form is a button that reads "CLEAR FORM". When you click on the button
all cells that are not locked for editing clear and you can reuse the form
for the next person. I need to recreate the CLEAR FORM button on an entirely
new form that I am making.
 
R

Ron de Bruin

Hi vdmbqb

I love your name<g>

Hold your Ctrl key when you select all cells that you want to clear
Then use Ctrl-F3 to give this range a name

You can use this code line then to clear the cells
Range("MyRange").ClearContents
 
V

vdmbqb

I tried this, but when I press Ctrl-F3 nothing happens.

By the way, the name vdmbqb was made up one night after too many glasses of
wine. I don't even remember what it means, but I have been using it now for
15 years.
 
R

Ron de Bruin

Unprotect your worksheet when you do this.
You only have to do this one time

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


vdmbqb said:
I tried this, but when I press Ctrl-F3 nothing happens.

By the way, the name vdmbqb was made up one night after too many glasses of
wine. I don't even remember what it means, but I have been using it now for
15 years.
 

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

Similar Threads

excel clear button 1
Clear page 3
clear specific cells in a form 1
clear cells macro 5
Clear button 5
Clear Button 2
Excel - randomly locking cells? 6
Excel Concatenate Form Name to Parse for function 1

Top