Lock Cell status

S

sunan

Is there any way in Excel to see the status of a cell whether it is Locked or
Unlocked when we move the cursor across the sheet? Can Excel prompt "Locked"
or "Unlocked" ?
Thanks,
SUNAN.
 
C

Chip Pearson

Not without using VBA.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Cells.Count > 1 Then
Exit Sub
End If
MsgBox "Cell Locked: " & Target.Locked
End Sub

Right click the worksheet tab, choose View Code and paste the
above code in to that code module.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
S

sunan

Thanks Chip,
Does that mean Locked Cell has a value =1 ? What value is that actually?
SUNAN
 
C

Chip Pearson

Sunan,

The Locked property returns a Boolean value of True or False.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
Top