title: Make a certain button appear when 2 radio buttons are pressed
body: <p>I'm trying to make a button appear when a certain combination of radio buttons are checked.</p>
  
  <p>When I press 2 radio buttons by example, no buttons show up even tho I made a if and multiple elsif for all the possiblilities. I want that when more than 2 radio buttons are chose that the right buttoon for the right combination shows up where the button "Commencer" is.</p>
  
  <p><a href="https://i.stack.imgur.com/5kt4f.png" rel="nofollow noreferrer">My program</a>
  My code:</p>
  
  <pre><code>Public Class Form1
  Dim time As Integer
  Dim score As Integer
  
  'https://docs.microsoft.com/en-us/visualstudio/ide/step-2-create-a-random-addition-problem?view=vs-2017'
  
  Private Sub lblEquations_Click(sender As Object, e As EventArgs) Handles lblEquations.Click
  
  End Sub
  
  '-------------------------------------------------------------------------------------------'
  
  Private Sub Timer_Tick(sender As Object, e As EventArgs) Handles Timer.Tick
      lblSecondes.Text = time
      time = time - 1
  
      If time = -1 Then
          Timer.Enabled = False
      End If
  End Sub
  
  Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
      time = 10
  
      cmdCommencer1to12Divi.Visible = False
      cmdCommencer1to6Divi.Visible = False
      cmdCommencer6to12Divi.Visible = False
      cmdCommencer1to12Multi.Visible = False
      cmdCommencer1to6Multi.Visible = False
      cmdCommencer6to12Multi.Visible = False
      cmdCommencer1to12Plus.Visible = False
      cmdCommencer1to6plus.Visible = False
      cmdCommencer6to12Plus.Visible = False
      cmdCommencer1to12Sous.Visible = False
      cmdCommencer1to6Sous.Visible = False
      cmdCommencer6to12Sous.Visible = False
  
  
      '-------------------------------------------------------------------------------------------'
  
  
      If RadBut1a12.Checked And RadButAddition.Checked = True Then
          cmdCommencer1to12Plus.Visible = True
  
          cmdCommencer1to12Divi.Visible = False
          cmdCommencer1to6Divi.Visible = False
          cmdCommencer6to12Divi.Visible = False
          cmdCommencer1to12Multi.Visible = False
          cmdCommencer1to6Multi.Visible = False
          cmdCommencer6to12Multi.Visible = False
          cmdCommencer1to6plus.Visible = False
          cmdCommencer6to12Plus.Visible = False
          cmdCommencer1to12Sous.Visible = False
          cmdCommencer1to6Sous.Visible = False
          cmdCommencer6to12Sous.Visible = False
  
      ElseIf RadBut1a12.Checked And RadButDivision.Checked = True Then
          cmdCommencer1to12Divi.Visible = True
  
          cmdCommencer1to6Divi.Visible = False
          cmdCommencer6to12Divi.Visible = False
          cmdCommencer1to12Multi.Visible = False
          cmdCommencer1to6Multi.Visible = False
          cmdCommencer6to12Multi.Visible = False
          cmdCommencer1to12Plus.Visible = False
          cmdCommencer1to6plus.Visible = False
          cmdCommencer6to12Plus.Visible = False
          cmdCommencer1to12Sous.Visible = False
          cmdCommencer1to6Sous.Visible = False
          cmdCommencer6to12Sous.Visible = False
  
      ElseIf RadBut1a12.Checked And RadButMultiplication.Checked = True Then
          cmdCommencer1to12Multi.Visible = True
  
          cmdCommencer1to12Divi.Visible = False
          cmdCommencer1to6Divi.Visible = False
          cmdCommencer6to12Divi.Visible = False
          cmdCommencer1to6Multi.Visible = False
          cmdCommencer6to12Multi.Visible = False
          cmdCommencer1to12Plus.Visible = False
          cmdCommencer1to6plus.Visible = False
          cmdCommencer6to12Plus.Visible = False
          cmdCommencer1to12Sous.Visible = False
          cmdCommencer1to6Sous.Visible = False
          cmdCommencer6to12Sous.Visible = False
  
      ElseIf RadBut1a12.Checked And RadButSoustraction.Checked = True Then
          cmdCommencer1to12Sous.Visible = True
  
          cmdCommencer1to12Divi.Visible = False
          cmdCommencer1to6Divi.Visible = False
          cmdCommencer6to12Divi.Visible = False
          cmdCommencer1to12Multi.Visible = False
          cmdCommencer1to6Multi.Visible = False
          cmdCommencer6to12Multi.Visible = False
          cmdCommencer1to12Plus.Visible = False
          cmdCommencer1to6plus.Visible = False
          cmdCommencer6to12Plus.Visible = False
          cmdCommencer1to6Sous.Visible = False
          cmdCommencer6to12Sous.Visible = False
  
  
          '-------------------------------------------------------------------------------------------'
  
  
      ElseIf RadBut1a6.Checked And RadButAddition.Checked = True Then
          cmdCommencer1to6plus.Visible = True
  
          cmdCommencer1to12Divi.Visible = False
          cmdCommencer1to6Divi.Visible = False
          cmdCommencer6to12Divi.Visible = False
          cmdCommencer1to12Multi.Visible = False
          cmdCommencer1to6Multi.Visible = False
          cmdCommencer6to12Multi.Visible = False
          cmdCommencer1to12Plus.Visible = False
          cmdCommencer6to12Plus.Visible = False
          cmdCommencer1to12Sous.Visible = False
          cmdCommencer1to6Sous.Visible = False
          cmdCommencer6to12Sous.Visible = False
  
      ElseIf RadBut1a6.Checked And RadButDivision.Checked = True Then
          cmdCommencer1to6Divi.Visible = True
  
          cmdCommencer1to12Divi.Visible = False
          cmdCommencer6to12Divi.Visible = False
          cmdCommencer1to12Multi.Visible = False
          cmdCommencer1to6Multi.Visible = False
          cmdCommencer6to12Multi.Visible = False
          cmdCommencer1to12Plus.Visible = False
          cmdCommencer1to6plus.Visible = False
          cmdCommencer6to12Plus.Visible = False
          cmdCommencer1to12Sous.Visible = False
          cmdCommencer1to6Sous.Visible = False
          cmdCommencer6to12Sous.Visible = False
  
      ElseIf RadBut1a6.Checked And RadButMultiplication.Checked = True Then
          cmdCommencer1to6Multi.Visible = True
  
          cmdCommencer1to12Divi.Visible = False
          cmdCommencer1to6Divi.Visible = False
          cmdCommencer6to12Divi.Visible = False
          cmdCommencer1to12Multi.Visible = False
          cmdCommencer6to12Multi.Visible = False
          cmdCommencer1to12Plus.Visible = False
          cmdCommencer1to6plus.Visible = False
          cmdCommencer6to12Plus.Visible = False
          cmdCommencer1to12Sous.Visible = False
          cmdCommencer1to6Sous.Visible = False
          cmdCommencer6to12Sous.Visible = False
  
      ElseIf RadBut1a6.Checked And RadButSoustraction.Checked = True Then
          cmdCommencer1to6Sous.Visible = True
  
          cmdCommencer1to12Divi.Visible = False
          cmdCommencer1to6Divi.Visible = False
          cmdCommencer6to12Divi.Visible = False
          cmdCommencer1to12Multi.Visible = False
          cmdCommencer1to6Multi.Visible = False
          cmdCommencer6to12Multi.Visible = False
          cmdCommencer1to12Plus.Visible = False
          cmdCommencer1to6plus.Visible = False
          cmdCommencer6to12Plus.Visible = False
          cmdCommencer1to12Sous.Visible = False
          cmdCommencer6to12Sous.Visible = False
  
  
          '-------------------------------------------------------------------------------------------'
  
  
      ElseIf RadBut6a12.Checked And RadButAddition.Checked = True Then
          cmdCommencer6to12Plus.Visible = True
  
          cmdCommencer1to12Divi.Visible = False
          cmdCommencer1to6Divi.Visible = False
          cmdCommencer6to12Divi.Visible = False
          cmdCommencer1to12Multi.Visible = False
          cmdCommencer1to6Multi.Visible = False
          cmdCommencer6to12Multi.Visible = False
          cmdCommencer1to12Plus.Visible = False
          cmdCommencer1to6plus.Visible = False
          cmdCommencer1to12Sous.Visible = False
          cmdCommencer1to6Sous.Visible = False
          cmdCommencer6to12Sous.Visible = False
  
      ElseIf RadBut6a12.Checked And RadButDivision.Checked = True Then
          cmdCommencer6to12Divi.Visible = True
  
          cmdCommencer1to12Divi.Visible = False
          cmdCommencer1to6Divi.Visible = False
          cmdCommencer1to12Multi.Visible = False
          cmdCommencer1to6Multi.Visible = False
          cmdCommencer6to12Multi.Visible = False
          cmdCommencer1to12Plus.Visible = False
          cmdCommencer1to6plus.Visible = False
          cmdCommencer6to12Plus.Visible = False
          cmdCommencer1to12Sous.Visible = False
          cmdCommencer1to6Sous.Visible = False
          cmdCommencer6to12Sous.Visible = False
  
      ElseIf RadBut6a12.Checked And RadButMultiplication.Checked = True Then
          cmdCommencer6to12Multi.Visible = True
  
          cmdCommencer1to12Divi.Visible = False
          cmdCommencer1to6Divi.Visible = False
          cmdCommencer6to12Divi.Visible = False
          cmdCommencer1to12Multi.Visible = False
          cmdCommencer1to6Multi.Visible = False
          cmdCommencer1to12Plus.Visible = False
          cmdCommencer1to6plus.Visible = False
          cmdCommencer6to12Plus.Visible = False
          cmdCommencer1to12Sous.Visible = False
          cmdCommencer1to6Sous.Visible = False
          cmdCommencer6to12Sous.Visible = False
  
      ElseIf RadBut6a12.Checked And RadButSoustraction.Checked = True Then
          cmdCommencer6to12Sous.Visible = True
  
          cmdCommencer1to12Divi.Visible = False
          cmdCommencer1to6Divi.Visible = False
          cmdCommencer6to12Divi.Visible = False
          cmdCommencer1to12Multi.Visible = False
          cmdCommencer1to6Multi.Visible = False
          cmdCommencer6to12Multi.Visible = False
          cmdCommencer1to12Plus.Visible = False
          cmdCommencer1to6plus.Visible = False
          cmdCommencer6to12Plus.Visible = False
          cmdCommencer1to12Sous.Visible = False
          cmdCommencer1to6Sous.Visible = False
  
      End If
  End Sub
  
  
  
  Public Sub StartQuiz1to6Plus()
      addend1 = randomizer.Next(6)
      addend2 = randomizer.Next(6)
  
      lblEquations.Text = addend1.ToString() &amp; " + " &amp; addend2.ToString()
  End Sub
  
  Public Sub StartQuiz6to12Plus()
      addend1 = randomizer.Next(6, 12)
      addend2 = randomizer.Next(6, 12)
  
      lblEquations.Text = addend1.ToString() &amp; " + " &amp; addend2.ToString()
  End Sub
  
  Public Sub StartQuiz1to12Plus()
      addend1 = randomizer.Next(12)
      addend2 = randomizer.Next(12)
  
      lblEquations.Text = addend1.ToString() &amp; " + " &amp; addend2.ToString()
  End Sub
  
  
  
  '-------------------------------------------------------------------------------------------'
  
  Public Sub StartQuiz1to6Sous()
      addend1 = randomizer.Next(6)
      addend2 = randomizer.Next(6)
  
      lblEquations.Text = addend1.ToString() &amp; " - " &amp; addend2.ToString()
  End Sub
  
  Public Sub StartQuiz6to12Sous()
      addend1 = randomizer.Next(6, 12)
      addend2 = randomizer.Next(6, 12)
  
      lblEquations.Text = addend1.ToString() &amp; " - " &amp; addend2.ToString()
  End Sub
  
  Public Sub StartQuiz1to12Sous()
      addend1 = randomizer.Next(12)
      addend2 = randomizer.Next(12)
  
      lblEquations.Text = addend1.ToString() &amp; " - " &amp; addend2.ToString()
  End Sub
  
  '-------------------------------------------------------------------------------------------'
  
  Public Sub StartQuiz1to6Multi()
      addend1 = randomizer.Next(6)
      addend2 = randomizer.Next(6)
  
      lblEquations.Text = addend1.ToString() &amp; " x " &amp; addend2.ToString()
  End Sub
  
  Public Sub StartQuiz6to12Multi()
      addend1 = randomizer.Next(6, 12)
      addend2 = randomizer.Next(6, 12)
  
      lblEquations.Text = addend1.ToString() &amp; " x " &amp; addend2.ToString()
  End Sub
  
  Public Sub StartQuiz1to12Multi()
      addend1 = randomizer.Next(12)
      addend2 = randomizer.Next(12)
  
      lblEquations.Text = addend1.ToString() &amp; " x " &amp; addend2.ToString()
  End Sub
  
  '-------------------------------------------------------------------------------------------'
  
  Public Sub StartQuiz1to6Divi()
      addend1 = randomizer.Next(6)
      addend2 = randomizer.Next(6)
  
      lblEquations.Text = addend1.ToString() &amp; "  " &amp; addend2.ToString()
  End Sub
  
  Public Sub StartQuiz6to12Divi()
      addend1 = randomizer.Next(6, 12)
      addend2 = randomizer.Next(6, 12)
  
      lblEquations.Text = addend1.ToString() &amp; "  " &amp; addend2.ToString()
  End Sub
  
  Public Sub StartQuiz1to12Divi()
      addend1 = randomizer.Next(12)
      addend2 = randomizer.Next(12)
  
      lblEquations.Text = addend1.ToString() &amp; "  " &amp; addend2.ToString()
  End Sub
  
  
  
  
  
  
  
  
  Private randomizer As New Random()
  
  Private addend1 As Integer
  Private addend2 As Integer
  
  Public Sub TimerReset()
      time = 10
  End Sub
  
  Private Sub txtReponse_TextChanged(sender As Object, e As EventArgs) Handles txtReponse.TextChanged
      If txtReponse.Text = (addend1 + addend2) Then
          TimerReset()
          score = score + 1
          lblScore.Text = score
          StartQuiz1to6Plus()
          txtReponse.Text = ""
  
      End If
  End Sub
  
  Private Sub cmdQuitter_Click(sender As Object, e As EventArgs) Handles cmdQuitter.Click
      End
  End Sub
  
  Private Sub cmdRestart_Click(sender As Object, e As EventArgs) Handles cmdRestart.Click
      Timer.Enabled = False
      TimerReset()
      lblEquations.Text = ""
      lblScore.Text = ""
      lblSecondes.Text = ""
      txtReponse.Text = ""
  End Sub
  
  Private Sub cmdCommencer1to6plus_Click(sender As Object, e As EventArgs) Handles cmdCommencer1to6plus.Click
      If cmdCommencer1to6plus.Text = "Commencer" Then
          cmdCommencer1to6plus.Text = "Arrêter"
  
          TimerReset()
          Timer.Enabled = True
          StartQuiz1to6Plus()
  
          If time = 0 Then
              Timer.Enabled = False
          End If
  
  
      ElseIf cmdCommencer1to6plus.Text = "Arrêter" Then
          TimerReset()
          Timer.Enabled = False
      End If
  End Sub
  
  Private Sub cmdCommencer1to12Divi_Click(sender As Object, e As EventArgs) Handles cmdCommencer1to12Divi.Click
      If cmdCommencer1to12Divi.Text = "Commencer" Then
          cmdCommencer1to12Divi.Text = "Arrêter"
  
          TimerReset()
          Timer.Enabled = True
          StartQuiz1to12Divi()
  
          If time = 0 Then
              Timer.Enabled = False
          End If
  
  
      ElseIf cmdCommencer1to12Divi.Text = "Arrêter" Then
          TimerReset()
          Timer.Enabled = False
      End If
  End Sub
  
  Private Sub cmdCommencer6to12Divi_Click(sender As Object, e As EventArgs) Handles cmdCommencer6to12Divi.Click
  
  End Sub
  
  Private Sub cmdCommencer1to6Divi_Click(sender As Object, e As EventArgs) Handles cmdCommencer1to6Divi.Click
  
  End Sub
  
  Private Sub cmdCommencer1to12Multi_Click(sender As Object, e As EventArgs) Handles cmdCommencer1to12Multi.Click
  
  End Sub
  
  Private Sub cmdCommencer6to12Multi_Click(sender As Object, e As EventArgs) Handles cmdCommencer6to12Multi.Click
  
  End Sub
  
  Private Sub cmdCommencer1to6Multi_Click(sender As Object, e As EventArgs) Handles cmdCommencer1to6Multi.Click
  
  End Sub
  
  Private Sub cmdCommencer1to12Sous_Click(sender As Object, e As EventArgs) Handles cmdCommencer1to12Sous.Click
  
  End Sub
  
  Private Sub cmdCommencer6to12Sous_Click(sender As Object, e As EventArgs) Handles cmdCommencer6to12Sous.Click
  
  End Sub
  
  Private Sub cmdCommencer1to6Sous_Click(sender As Object, e As EventArgs) Handles cmdCommencer1to6Sous.Click
  
  End Sub
  
  Private Sub cmdCommencer1to12Plus_Click(sender As Object, e As EventArgs) Handles cmdCommencer1to12Plus.Click
  
  End Sub
  
  Private Sub cmdCommencer6to12Plus_Click(sender As Object, e As EventArgs) Handles cmdCommencer6to12Plus.Click
  
  End Sub
  
  Private Sub RadButAddition_CheckedChanged(sender As Object, e As EventArgs) Handles RadButAddition.CheckedChanged
  
  End Sub
  </code></pre>
  
  <p>End Class</p>