*Select the entire sheet (you can do this by clicking on the icon above row
1 and to the left of column A)
*Right click in the sheet and select FORMAT CELLS
*Go to the Protection tab and UNCHECK LOCKED
*Now, go back to your sheet, right click on the cell(s) you want to protect
and again select format cells
*Go to the protection tab and CHECK LOCKED
*When you are done selecting the cells to be locked go to the ribbon and
select the review tab
*Click on protect sheet
*Enter a password
This should result in a sheet containing selected cells that are password
protected.
With ActiveSheet
.Unprotect Password:="justme"
.Cells.Locked = False
.EnableSelection = xlUnlockedCells
.UsedRange.Select
End With
For Each cell In Selection
If cell.HasFormula Then
cell.Locked = True
Selection.FormulaHidden = False
End If
Next
Range("A1").Select
ActiveSheet.Protect Password:="justme"
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.