Dim i As Long
Dim j As Long
Dim k As Long
Dim bOV As Boolean
Dim bXAF As Boolean
Dim sTxt As String
' Lock Framed Opening Cells
Sheets("Gen_3").Activate
ActiveSheet.Unprotect Password:="MyPassword"
For i = 278 To 341
sTxt = Range("G" & i).Value
Select Case sTxt
Case "", "n/a"
bOV = True
bXAF = True
End Select
If InStr(sTxt, "Open") Then
bOV = False
bXAF = True
End If
sTxt = Range("C" & i).Value
'*****************************************************************
'you could change this use Or instead of an ElseIf
'I do not know the speed difference between the 2 methods
'*******************************************************************
If InStr(sTxt, "Front") Then
bXAF = True
ElseIf nStr(sTxt, "Back") Then
bXAF = True
End If
If Range("x" & i).Value = "Select Endwall Type" Then
bXAF = False
End If
Range("O" & i & ":V" & i).Locked = bOV
Range("X" & i & ":AF" & i).Locked = bXAF
Next i
Bookmarks