S
Sandy
All of the Cells in the Range("C40:K40,M40:U40") are unlocked, however as a
result of the following code only those cells which have the validation
added need to be unlocked. The rest can be locked.
My question - Is it possible to only unlock the cells with validation added
at runtime.
For Each mycell In Range("")
'***The following can be locked
If mycell.Value = "Hit" Then
With mycell.Offset(1)
.Validation.Delete
.Value = ""
End With
'***The following Must be unlocked
ElseIf mycell.Value = "Miss" Then
With mycell.Offset(1).Validation
.Delete
.Add Type:=xlValidateList, Formula1:="Right,Wrong"
.IgnoreBlank = True
.InCellDropdown = True
End With
End If
Next
Sandy
result of the following code only those cells which have the validation
added need to be unlocked. The rest can be locked.
My question - Is it possible to only unlock the cells with validation added
at runtime.
For Each mycell In Range("")
'***The following can be locked
If mycell.Value = "Hit" Then
With mycell.Offset(1)
.Validation.Delete
.Value = ""
End With
'***The following Must be unlocked
ElseIf mycell.Value = "Miss" Then
With mycell.Offset(1).Validation
.Delete
.Add Type:=xlValidateList, Formula1:="Right,Wrong"
.IgnoreBlank = True
.InCellDropdown = True
End With
End If
Next
Sandy