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

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
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,213,550
Messages
6,114,265
Members
448,558
Latest member
aivin

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