Nick, this will unlock the sheet, clear all the unlocked cells on a
worksheet, protect the sheet, is this what you want? you say form, but it
sounds like you are talking about unlocked cells in the worksheet
Sub Clear_Unlocked()
Dim Cel As Range
Const Password = "123" '**Change password here**
Application.ScreenUpdating = False
ActiveSheet.Unprotect Password:=Password
For Each Cel In ActiveSheet.UsedRange.Cells
If Cel.Locked = False Then Cel.Formula = ""
Next
ActiveSheet.Protect Password:=Password
Application.ScreenUpdating = True
End Sub
--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003
"Nick" wrote in message
...
I would like to insert a button into a quotation form that will clear data
from all unlocked cells ie name, address equipment and costings. The form
was created in Excel.
|