title: Activating and deactivating a command button based on a cell value
body: <p>I'm relatively new but learning quickly.  I have a cell (Sheet8.Range("E15")) that produces TRUE or FALSE (boolean) based on other conditions.  My goal is that when this cell = TRUE, the button is active.  If cell value changes to FALSE, I want the button to be inactive.  Thanks for the help!</p>
  
  <pre><code>Private Sub Worksheet_Change(ByVal Target As Range)
  
  Dim KeyCells As Range
  Set KeyCells = Sheet8.Range("E15")
  
  If Not Application.Intersect(KeyCells, Range(Target.Address)) Is Nothing Then
  
        If Sheet8.Range("E15").Value = True Then CommandButton1.Enabled = True
        If Sheet8.Range("E15").Value = False Then CommandButton1.Enabled = False
  
  End If
  
  End Sub
  </code></pre>