Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Select locked/unlocked cells
I came across an excellent procedure here in the Excel Programming discussion
group last week but didn't capture it to disk. Would someone be able to provide the code to select all locked/unlocked cells on a worksheet? MUCH appreciated! Training Goddess |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Select locked/unlocked cells
Hi Training Goddess (cool name!)
Search this group using select all locked/unlocked cells -always search as a first option. regards Paul On Sep 22, 2:57*am, Training Goddess wrote: I came across an excellent procedure here in the Excel Programming discussion group last week but didn't capture it to disk. Would someone be able to provide the code to select all locked/unlocked cells on a worksheet? MUCH appreciated! Training Goddess |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Select locked/unlocked cells
Maybe
Sub mariner() Dim MyState As Boolean Dim MyType As String Dim MyRange As Range, C As Range response = InputBox("Select What? Locked (L) or Unlocked (U)") If response = vbCancel Then Exit Sub Select Case UCase(response) Case "L" MyState = True MyType = "Unlocked" Case "U" MyState = False MyType = "Locked" Case Else Exit Sub End Select For Each C In ActiveSheet.UsedRange If C.Locked = MyState Then If MyRange Is Nothing Then Set MyRange = C Else Set MyRange = Union(MyRange, C) End If End If Next C If MyRange Is Nothing Then MsgBox "All cells are " & MyType Else MyRange.Select End If End Sub Mike "Training Goddess" wrote: I came across an excellent procedure here in the Excel Programming discussion group last week but didn't capture it to disk. Would someone be able to provide the code to select all locked/unlocked cells on a worksheet? MUCH appreciated! Training Goddess |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Locked Several Worksheets, allow format cells/select unlocked cell | Excel Discussion (Misc queries) | |||
Unlocked cells become locked on paste | Excel Programming | |||
Display locked or Unlocked cells | Excel Discussion (Misc queries) | |||
Searching for locked/unlocked cells | Excel Programming | |||
how do you "select locked cells" w/o "select unlocked cells"? | Excel Discussion (Misc queries) |