ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   View which cells are locked? (https://www.excelbanter.com/excel-discussion-misc-queries/200731-view-cells-locked.html)

sammy

View which cells are locked?
 
Hi All,

Is there any way to visually see which cells are locked and/or which cells
are unlocked?

TIA,
Sammy

Gary''s Student

View which cells are locked?
 
This little macro will find locked cells within the used range:

Sub SeeLocked()
Set ll = Nothing
For Each r In ActiveSheet.UsedRange
If r.Locked = True Then
If ll Is Nothing Then
Set ll = r
Else
Set ll = Union(ll, r)
End If
End If
Next
If ll Is Nothing Then
MsgBox ("nothing locked")
Else
ll.Select
End If
End Sub
--
Gary''s Student - gsnu200802


All times are GMT +1. The time now is 02:26 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com