title: Need to disable the range of cells based on the drop down input from another cell
body: <p>Is it possible to lock a particular range of cells based on the input from a dropdown in a row of data?  For example, The row <code>C5</code> contains <code>Yes</code> or <code>No</code>  (which is selected/entered via a dropdown). If I choose <code>No</code>, the cells <code>F11:F28</code> should be disabled also protect input fields so nothing can be entered.</p>
  
  <pre><code>ActiveSheet.Protect Contents:=True 
  </code></pre>
  
  <p>after locking cells</p>
  
  <pre><code>Private Sub Worksheet_SelectionChange(ByVal Target As Range)  
      If Target.Count &gt; 1 Then Exit Sub  
      Set myRng = Range("F11:F28")  
      For Each C In myRng
          If C.Address = Target.Address And ActiveSheet.Name = ActiveSheet.Range("C5").Value ="Yes" Then
              ActiveSheet.Unprotect Password:= "xyz"  
              Range("F11:F28").Locked = False  
              ActiveSheet.Protect Password:= "xyz"  
              Exit For  
          Else  
              ActiveSheet.Unprotect Password:= "xyz"  
              Range("F11:F28").Locked = True
              ActiveSheet.Protect Password:= "xyz"  
          End If  
      Next C  
  End Sub
  </code></pre>
  
  <p>Expected Results: </p>
  
  <p>When I choose <code>No</code> in cell <code>C5</code> the cell range from <code>F11:F28</code> should be disabled/protected so nothing can be entered.</p>