![]() |
#1
|
||||
|
||||
![]()
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 |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Table Help: lock table structure and collapse/expand parts of table | bsafra1 | Word | 0 | 11-06-2018 03:01 AM |
Lock items in a table | village | Word | 2 | 06-22-2017 07:33 AM |
Lock Linked Cells And Unlinked Cells In A Row | paulkaye | Excel | 5 | 07-14-2014 10:20 PM |
![]() |
spookiepower | Word | 4 | 11-26-2013 02:40 PM |
Protect / Lock Cells / Print Set-up? | meggenm | Excel | 3 | 01-26-2012 09:57 PM |