Patriot2879
Well-known Member
- Joined
- Feb 1, 2018
- Messages
- 1,259
- Office Version
- 2010
- Platform
- Windows
HI Can you help me please i have the code below, but it doesnt seem to work, i think i am putting the code in the wrong place i added this to a new module but it doesnt work, i only want to lock cells in sheets(Northants) and the cells i want to lock are B8, B9, B10, B11, F8 and F9, can you help and advixse me please, thanks in advance.
Code:
Sub LockCellsWithFormulas()
With ActiveSheet
.Unprotect
.Cells.Locked = False
.Cells.SpecialCells(xlCellTypeFormulas).Locked = True
.Protect AllowDeletingRows:=True
End With
End Sub