Auto Lock Cells After Data Entry in Excel Telugu

Auto Lock Cells After Data Entry in Excel Telugu

Auto Lock Cells After Data Entry in Excel Telugu

Step 1:-

1. Select the Particular Cells

2. Go to Format Cells

3. Un Check Lock Option

Step 2:-

1. Review Tab – Protect Sheet Option

2. Set Password 2 Times

Step 3:-

Copy VBA Code

Change the Range & Password in Code

VBA Code:-


private Sub Worksheet_Change(ByVal Target As Range)

Dim xRg As Range

On Error Resume Next

Set xRg = Intersect(Range(“A1:E15”), Target)

If xRg Is Nothing Then Exit Sub

Target.Worksheet.Unprotect Password:=”111″

xRg.Locked = True

Target.Worksheet.Protect Password:=”111″

End Sub


Step 4:-

Save Excel File in Macro Format

After Set Password VBA Code in VBA Window..

 

durgaprasad

leave a comment

Create Account



Log In Your Account