Hi all.
I have copied a code that lock cells with formula in a workbook. I would like the code to lock the cells with formula in table "tAbstract" only, not the whole workbook. Would someone please edit the code?
Also, I would like the message "Ooooops formula na" pops up when/if the user accidentally goes to a protected cell.
Thank you for the usual help.
Code:
Sub ProtectFormulaCells()
Dim sh As Worksheet
On Error Resume Next
For Each sh In ActiveWorkbook.Sheets
With sh
.Unprotect
.Cells.Locked = False
.Cells.SpecialCells(xlCellTypeFormulas).Locked = True
.Protect
End With
Next sh
End Sub