Forum Discussion
yugal40
Nov 12, 2021Brass Contributor
Autolocking a table
Hi All, I am autolocking a cell when typing a value in the cell, But when i am doing this the table sometimes in my workbook is not expanding, Can anyone help me for the same. For more please refe...
NikolinoDE
Nov 13, 2021Platinum Contributor
Untested ... hope it works :))
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
ActiveSheet.Unprotect Password:="xyz"
Target.Locked = True
With ActiveSheet
.Protect userinterfaceonly:=True, Password:="xyz", AllowInsertingColumns:=True, AllowInsertingRows:=True
.EnableOutlining = True
.EnableAutoFilter = True
End With
End Sub
- yugal40Nov 13, 2021Brass Contributor
NikolinoDE
Thanks for your reply.
But its not working, Please refer to the attached workbook- NikolinoDENov 13, 2021Platinum Contributor
Hope I was able to help you with these sample files 🙂.
NikolinoDE
I know I don't know anything (Socrates)
- yugal40Nov 13, 2021Brass Contributor
NikolinoDE Thanks again for helping me,
The concern here is i want tonly freshly cells to be auto locked and in the attached workbook when i added C6 and C7 cell it worked, But after that it didn't worked for cell C8
Can you please check if the same is happening with you as well?
I am using Office 365 with windows, Not sure if that matters
Thanks