Hello,
I'm making a small tool for end users and to ensure nothing gets altered that shouldnt get altered I have the following code in place:
Now there is one slide where users will add thousands of rows of data over time.ActiveSheet.Protect Password:="test", userinterfaceonly:=True, AllowFiltering:=True
ActiveSheet.EnableSelection = xlUnlockedCells
Each time a row o data is added the range of the row is unlocked using the following code:
This means the user will be able to alter the actual data within the tool freely without affecting anything else.Range(Cells(NewRow, StartColumn), Cells(NewRow, EndColumn)).Locked = False
However, I'm a bit fearful to use 'unlocked cells' in combination with 'protected sheets'. I suspect this was the cause of corrupted files I have had in the past.
I already noticed that the file size increased when 2000 rows of data became 'unlocked'.
Anybody else have experience with this kind of code (good or bad) and perhaps any advice on what to do and what not to do?
Bookmarks