Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Sub Locked_Cells()
'Bob Flanagan source of code Dim Cell As Range, tempR As Range, rangeToCheck As Range 'check each cell in the selection For Each Cell In Intersect(Selection, ActiveSheet.UsedRange) If Cell.Locked Then If tempR Is Nothing Then 'initialize tempR with the first qualifying cell Set tempR = Cell Else 'add additional cells to tempR Set tempR = Union(tempR, Cell) End If End If Next Cell 'display message and stop if no cells found If tempR Is Nothing Then MsgBox "There are no Locked cells " & _ "in the selected range." End End If 'select qualifying cells tempR.Interior.ColorIndex = 3 End Sub Gord Dibben MS Excel MVP On Wed, 16 Jul 2008 10:56:13 -0700, smithista wrote: Is there a way to show which cells in a worksheet are locked? Thanks Stephen |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
paste locked cells and unlocked cells in protected sheet | Excel Worksheet Functions | |||
locked cells | Excel Worksheet Functions | |||
locked cells | Excel Discussion (Misc queries) | |||
Put comments on a locked spreadsheet even though cells not locked | Excel Worksheet Functions | |||
Locked cells | Excel Worksheet Functions |