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.
 

Some videos you may like

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December

lenze

Legend
Joined
Feb 18, 2002
Messages
13,690
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
 

QCDARLENE

New Member
Joined
Jul 9, 2009
Messages
28
I am using 12 columns of data (A thru L), entering data per row and the sheet is not password protected just protected.
 

lenze

Legend
Joined
Feb 18, 2002
Messages
13,690
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
 

QCDARLENE

New Member
Joined
Jul 9, 2009
Messages
28

ADVERTISEMENT

Sorry, what is a sheet module and how do I access it?
 

lenze

Legend
Joined
Feb 18, 2002
Messages
13,690
Right click the sheet tab and choose "View Code". This will open the sheet module. You an close it using ALT +Q!!

lenze
 

Watch MrExcel Video

Forum statistics

Threads
1,127,788
Messages
5,626,890
Members
416,208
Latest member
tan21

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
Top