title: Activating a button only when CheckBox1 and CheckBox2 = True in Excel UserForm
body: <p>So I am trying to make a UserForm where if both checkboxes are marked the button will be allowed to be clicked.  I have tried a bunch of different code here is my first try.</p>
  
  <pre><code>Private Sub CommandButton1_Click()
  
  If CheckBox1.Value = True &amp; CheckBox2.Value = True Then
          CommandButton1.Enabled = True
      Call GOGOGO
      ElseIf CheckBox1.Value = True &amp; CheckBox2.Value = False Then
          MsgBox ("Run Characteristics Version 1.2.xlsm")
      ElseIf CheckBox1.Value = False &amp; CheckBox2.Value = True Then
          MsgBox ("Log in")
      Else
          MsgBox ("Log in and Run Characteristics Version 1.2.xlsm")
  End If
  
  End Sub
  </code></pre>
  
  <p>Also Tried</p>
  
  <pre><code>Private Sub CheckBox1_Change()
  
      'Evaluate the value of the CheckBox
      Select Case CheckBox1.Value
          Case True, False
      End Select
  
  End Sub
  Private Sub CheckBox2_Change()
  
      'Evaluate the value of the CheckBox
      Select Case CheckBox2.Value
          Case True, False
      End Select
  
  End Sub
  Private Sub CommandButton1_Click()
      Select Case CheckBox1.Value
      Select Case CheckBox2.Value
      If CheckBox1.Value = True &amp; CheckBox2.Value = True Then
          CommandButton1.Enabled = True
          Call GOGOGO
          ElseIf CheckBox1.Value = True &amp; CheckBox2.Value = False Then
              MsgBox ("Run Characteristics Version 1.2.xlsm")
          ElseIf CheckBox1.Value = False &amp; CheckBox2.Value = True Then
              MsgBox ("Log in")
          Else
              MsgBox ("Log in and Run Characteristics Version 1.2.xlsm")
      End If
      End Select
      End Select
      End Sub
  </code></pre>
  
  <p>Both only give me my first ElseIf.  So with all the different combinations of checkboxes when I click the commandbutton i always get msgBox "Run Characteristics...."</p>
  
  <p>Question: How Can I make a button In Excel UserForm only Run a command when 2 checkboxes are marked?</p>