ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Button to clear all entries? (https://www.excelbanter.com/excel-worksheet-functions/19348-button-clear-all-entries.html)

Randy

Button to clear all entries?
 
I am creating a fill in form in excel 2000. I am locking everything except
the cells I need filled in. I need a way to clear all entries in these
cells after a form is completed and printed. This way the next user has a
clean form to begin with. How can I do this...Thanks..Randy



JulieD

Hi Randy

although this is possible an alternative would be to create your form as a
template - this way you don't have to rely on people remembering to click
buttons or do "save as" - a template will give them a blank form every time.

To create a template, set up your form, with all the unlocked cells blank
and then choose file /save as - and change files of type (down the bottom of
the screen) to template - click OK (or save or whatever) - don't change the
directory.

and then close the form.

Now to use it, choose from the menu, file / new - you should see your form
listed, choose it and you'll have it ready to be filled in.

Cheers
JulieD


"Randy" wrote in message
...
I am creating a fill in form in excel 2000. I am locking everything except
the cells I need filled in. I need a way to clear all entries in these
cells after a form is completed and printed. This way the next user has a
clean form to begin with. How can I do this...Thanks..Randy




Bob Phillips

There was similar question in .programming earlier, this was my response
there

Sub ClearCells()
Dim cell As Range
With ActiveSheet
For Each cell In .UsedRange
If Not cell.Locked Then
cell.ClearContents
End If
Next cell
End With
End Sub

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Randy" wrote in message
...
I am creating a fill in form in excel 2000. I am locking everything

except
the cells I need filled in. I need a way to clear all entries in these
cells after a form is completed and printed. This way the next user has a
clean form to begin with. How can I do this...Thanks..Randy






All times are GMT +1. The time now is 12:15 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com