Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Is there a way to lock a cell from edit or delete after a person has entered
data into it? I am using Excel as a survey tool in a class. Each student will create a survey and then the students will rotate around the lab and take each student's survey. I don't want a student messing with the former student's data by changing the answer. Therefore I need to lock or hide the answer after the student entered it. -- Thanks As Always Rip |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Ripper, you could some code in the sheet module, right click on the sheet
tab view code like this, Private Sub Worksheet_Change(ByVal Target As Range) 'Automatically Protecting After Input 'unlock all cells in the range first Dim MyRange As Range Const Password = "123" '**Change password here** Set MyRange = Intersect(Range("A1:B10,C5"), Target) '**change range here** If Not MyRange Is Nothing Then Unprotect Password:=Password MyRange.Locked = True Protect Password:=Password End If 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 "Ripper" wrote in message ... Is there a way to lock a cell from edit or delete after a person has entered data into it? I am using Excel as a survey tool in a class. Each student will create a survey and then the students will rotate around the lab and take each student's survey. I don't want a student messing with the former student's data by changing the answer. Therefore I need to lock or hide the answer after the student entered it. -- Thanks As Always Rip |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Cell data format | Excel Discussion (Misc queries) | |||
Blocking entry of data in a cell | Excel Worksheet Functions | |||
data in cell not corresponding with entry | New Users to Excel | |||
Excel Macro to Copy & Paste | Excel Worksheet Functions | |||
Vlookup for data contained in a cell | Excel Worksheet Functions |