Sheet Protection

QCDARLENE

New Member
Joined
Jul 9, 2009
Messages
28
I need to protect the data already entered but allow entry of new data. Then once the new data has been saved, it too will be protected.
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
This can be done using a CHnage Event. What Columns or cells do you enter data into?? Are you entering data across rows?? Is the sheet password protected??
lenze
 
Upvote 0
I am using 12 columns of data (A thru L), entering data per row and the sheet is not password protected just protected.
 
Upvote 0
OK: Select Columns A:L and then unlock all cells via cells format. Now select all cells in A:L with current data and lock them. Now place this code in the sheet module
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count > 1 Then Exit Sub
If Target.Column > 12 Then Exit Sub
Me.Unprotect
Target.Locked = True
Me.Protect
End Sub

When data is entered, the cell will automatically be locked.

lenze
 
Upvote 0
Right click the sheet tab and choose "View Code". This will open the sheet module. You an close it using ALT +Q!!

lenze
 
Upvote 0

Forum statistics

Threads
1,224,600
Messages
6,179,836
Members
452,947
Latest member
Gerry_F

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top