Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a range of cells selected... using macros how can I unprotect all
those in the range that do not have formulas on it? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
Try this: Sub UnprotectCells() ActiveSheet.Unprotect password:="JustMe" For Each cell In Selection If cell.HasFormula = False Then cell.Locked = False End If Next ActiveSheet.Protect password:="JustMe" End Sub Regards, Per On 19 Sep., 04:44, Alberto Ast wrote: I have a range of cells selected... using macros how can I unprotect all those in the range that do not have formulas on it? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try the below....
Me.Unprotect Password:="dist" ActiveSheet.Cells.Locked = True Selection.Locked = False Selection.SpecialCells(xlCellTypeFormulas, 23).Select Selection.Locked = True Selection.FormulaHidden = True Me.Protect Password:="dist" If this post helps click Yes --------------- Jacob Skaria "Alberto Ast" wrote: I have a range of cells selected... using macros how can I unprotect all those in the range that do not have formulas on it? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Lookup cells in one column and clear cells in another | Excel Programming | |||
Create a Clear button to clear unprotected cells | Excel Programming | |||
Clear cells | Excel Programming | |||
clear contents cells of unprotected cells | Excel Programming | |||
Clear cells range if certain cells are all empty | Excel Programming |